View Full Version : Sound question
Maddieman
12-31-2002, 01:49 PM
player->A_StopAll3DSounds( elevator_humming_loop );
This is wrong.
Your elevator is a dynamic object with an animation, correct?
In MaxED, in the elevator animation code:
Leaving keyframe1:
this->a_play3dsound(dynamic, elevator_humming_loop,"");
Reaching keyframe2:
this->a_stopall3dsounds("");
Roneye
12-31-2002, 02:00 PM
I tried that but it also didn't work.
I've placed a screenshot of the message system of the elevator:
http://www.toms-silksite.nl/elevator%20problem.JPG
PS: that vault stop sound, is the elevator stop sound, I just thought that one sounded better!
And the stop all 3d sound message in the middle, is a second try, but that also didn't work.
[ 12-31-2002, 02:03 PM: Message edited by: Roneye ]
Maddieman
12-31-2002, 02:10 PM
So what actually happend with that fsm?
Try this->a_stopall3dsounds(\"\");
Roneye
12-31-2002, 02:15 PM
the sound just keeps on playing.
if I try this->a_stopall3dsounds(\"\");
I get an error message that says that the last argument must be an empty string.
Maddieman
12-31-2002, 02:18 PM
Hmm...it's probably something obvious - but oh well. I'll figure it out another year, maybe...
Roneye
12-31-2002, 02:20 PM
BTW: here is the LVL file: http://www.toms-silksite.nl/level.LVL
EDIT: Link fixed images/icons/smile.gif
PS: the elevator hangs up in the shaft.
The elevator is called: elevator01
and this is the location: ::startroom::elevator01::
[ 12-31-2002, 02:23 PM: Message edited by: Roneye ]
Hmmm... I can't see anything that's obviously wrong either. I was wondering if you didn't have continuous update on or something, but I've looked at the level file and you do... Also, you are planning on unioning your elevator together aren't you? I don't see much point in having all those separate meshes, it just makes things more complicated.
Maybe you should try putting in another animation that gets played when the moving animation has finished - try putting the stopping sound at the beginning of the new animation and see if that works. You'd probably need another animation anyway, as you might want a slight delay before your doors open etc.
Also, the reason that the code in the middle box didn't work is because that code only gets executed when the animation is reversed with the command, this->do_invertanimation(); When the animation reaches the starting keyframe again, any code in the middle box will be executed.
william ford
12-31-2002, 05:23 PM
Don't worry bout what a wrote just then(if anyone did read it). Try putting a comma infront of the "" thingys, for some reson i thinkin that.
[ 12-31-2002, 05:31 PM: Message edited by: william ford ]
Roneye
01-01-2003, 12:38 AM
I've got a question. images/icons/smile.gif
I've build a elevator with a sound that is played when the elevator is going down, and one sound that is being played as soon as the elevator reaches the bottom. But how do I make the humming elevator sound stop?
The elevator stop sound is being played, but the other sound keeps on playing.
Maddieman
01-01-2003, 12:52 AM
Make sure the humming sound is a 3d sound emmitted from the elevator. Then when the elevator reaches its destination, (i.e. reaching second keyframe tab) try the command:
this->a_stopall3dsounds(\"\");
It should work...
Roneye
01-01-2003, 12:58 AM
I've inserted this message:
player->A_StopAll3DSounds( elevator_humming_loop );
and then after that:
this->A_Play3DSound( dynamic, elevator_stop, "" );
so that is correct?
EDIT: Er no that didn't work.
[ 12-31-2002, 01:08 PM: Message edited by: Roneye ]
What is it with all these weird syntaxes?
this->a_stopall3dsounds(\"\");
this->a_stopall3dsounds(,"");
This is what the documentation says:
A_StopAll3DSounds ( string bone );
Stops all 3D sounds that the object is playing. Used for stopping looping sounds. Parameter is an empty string ( "" ), unless you are playing the sound through a character, when you must use the same bone name as when creating the sound, E.g., Head, Pelvis or Gun.
player->A_StopAll3DSounds( gun );
this->A_StopAll3DSounds( "" );
<font size="2" face="Verdana, Arial">The code posted in the FSM screenshot looks like it ought to work, which makes me think that it must be something other than the elevator's FSM¿
Roneye
01-01-2003, 05:36 AM
I've removed the LVL file, and after two hours of work it finally worked! I created 4 other animations for the elevator, and now it works!
Thanks for all the help!
PS: what do you guys think of my level design skills?
Co&Co
01-01-2003, 09:52 AM
Hey Roneye, happy new year!
You can send me the .LVL file if you like. I'm very interested! thx
email: threni@chello.nl
[ 01-01-2003, 10:08 AM: Message edited by: Co&Co ]
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.