| Author |
Topic: Plane sounds Pt 2 ?! |
| paulo88 |
 |
General Member Since: Apr 18, 2005 Posts: 573 Last: May 8, 2009 [view latest posts] |
|
|
|
|
| The_Caretaker |
General Member Since: Jun 8, 2004 Posts: 11625 Last: Jul 7, 2009 [view latest posts] |
|
|
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Sunday, Sep. 25, 2005 10:59 pm |
 |
I think u meant you hear them 15 secs bfore u see them?
In the script there is a command wait(15);
Just reduce that!
Grassy |
 |
|
|
| paulo88 |
 |
General Member Since: Apr 18, 2005 Posts: 573 Last: May 8, 2009 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Sunday, Sep. 25, 2005 11:27 pm |
 |
Yes ! sorry !
What happens is as soon as the map starts I can hear the planes coming.
I then sounds as though they pass over me but I cant see anything.
Then 15'ish seconds later the planes go over ! LOL
Which WAIT do I have to alter as there about 4 in the script ?
Quote: level thread planes();
}
planes()
{
level.PlaneSpeed = 4.0;
stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
temp = getent (stuka1.target,"targetname");
stuka1.dest = temp.origin;
stuka1.start = stuka1.origin;
stuka1 hide();
temp = getent (stuka2.target,"targetname");
stuka2.dest = temp.origin;
stuka2.start = stuka2.origin;
stuka2 hide();
wait 15;
while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .15;
stuka2 thread plane_flyby("stuka_flyby");
wait 180;
stuka3 thread plane_flyby("stuka_flyby");
wait 60;
}
}
plane_flyby(sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);
wait 2;
self show();
self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);
wait level.PlaneSpeed;
self hide();
self.origin = self.start;
} |
|
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Sunday, Sep. 25, 2005 11:43 pm |
 |
paulo88 writes...Quote: Yes ! sorry !
What happens is as soon as the map starts I can hear the planes coming.
I then sounds as though they pass over me but I cant see anything.
Then 15'ish seconds later the planes go over ! LOL
Hmm well there is only a 2 sec wait from playsound to show the model... So maybe it's because you models start too far out of the playarea, combined with your cullfog, means a player dont see em for some time.
Grassy |
 |
|
|
| paulo88 |
 |
General Member Since: Apr 18, 2005 Posts: 573 Last: May 8, 2009 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Monday, Sep. 26, 2005 12:09 am |
 |
OK, I've managed to get the planes to fly over intime with the sounds effect.
But.... I cant here them when I move to the end of their flight path.
If Im near the origin then its perfect. I here them evertime and in synch.
If I move to the point where I make them dissappear at the other side of the map, I hear nothing !
Any ideas why this could be happening. ![[banghead]](images/BBCode/smilies/banghead.gif) |
|
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Monday, Sep. 26, 2005 12:18 am |
 |
Ok looking at the script again, a little rewrite would possibly work better in your map...
Code: level thread planes();
}
planes()
{
level.PlaneSpeed = 4.0;
stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
temp = getent (stuka1.target,"targetname");
stuka1.dest = temp.origin;
stuka1.start = stuka1.origin;
stuka1 hide();
temp = getent (stuka2.target,"targetname");
stuka2.dest = temp.origin;
stuka2.start = stuka2.origin;
stuka2 hide();
wait 15;
while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .15;
stuka2 thread plane_flyby("stuka_flyby");
wait 180;
stuka3 thread plane_flyby("stuka_flyby");
wait 60;
}
}
plane_flyby(sound)
{
//show the plane
self show();
//start the move
self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);
//this is wrong
//wait level.PlaneSpeed;
//because of the sound/view delay you could
//start the sound a bit later, alter this to fit your own
//map size, view distances
wait (2);
if (isdefined (sound))
self playsound (sound);
//wait for the move to complete
self waittill ("movedone");
self hide();
self.origin = self.start;
}
Grassy |
 |
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Monday, Sep. 26, 2005 12:27 am |
 |
Quote: OK, I've managed to get the planes to fly over intime with the sounds effect.
But.... I cant here them when I move to the end of their flight path.
If Im near the origin then its perfect. I here them evertime and in synch.
If I move to the point where I make them dissappear at the other side of the map, I hear nothing !
Sigh... forget too quickly you do young Padawan Learner!
Quote: Category: CoDUO Level Design
Posted: Friday, Sep. 16, 2005 06:27 pm
Ok I fixed it for you Paulo
Change your alias entry for this one:
Quote:stuka_flyby,,vehicles/stuka_by02.wav,1.5,1.5,0.8,1.1,12000,16000,auto,,,,,
The reason you didnt here it before was you didnt specify a min distance.
Quote:,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
If not specified it will default to 120 which is way too small.
The way sounds work in this engine means if your not within hearing distance it wont start playing the sound. As the planes get closer to you the engine dosn't know your location and that you should be able to hear the sounds now, not unless you wanted to track the locations of every player in the map every second... :) It only check players origins when a call is made to play a sound. This is my understanding of it anyway.
Also your planes start a long way out of the play area which meant a of the time payers would be out of range or outside the min distance value.
I found the sounds to be erratic, as I say above, it depended on where I was located in the as to if it played the sound file or not.
With these changes it plays every time unless your way over the back corner of the map.
edited on Sep. 16, 2005 06:32 pm by WHC_Grassy |
 |
|
|
| WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
|
| paulo88 |
 |
General Member Since: Apr 18, 2005 Posts: 573 Last: May 8, 2009 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|