Doorbell sound...what to schedule it from?
by Mike Rowley · in Torque Game Engine · 04/24/2008 (2:07 pm) · 2 replies
I'm attempting to put a "doorbell" type sound in my game, where when a player spawns in, the sound file plays.
I have attempted to start the sound from several different places, but none play the sound when I actually want it to play. I've attempted placeing it in "server/scripts/game.cs" in the following places:
All these places play the sound at the end of the lighting phase. All but in the function startgame, it will actually play twice. What I want is the sound to play when the player actually enters the game. Where is the best place to place my sfxPlay(); ??
I have also tried a trigger that plays the same way as putting my play in the functions above.
Thanks for any help.
I have attempted to start the sound from several different places, but none play the sound when I actually want it to play. I've attempted placeing it in "server/scripts/game.cs" in the following places:
function startGame() function GameConnection::onClientEnterGame(%this) after %this.spawnPlayer(); and in function GameConnection::spawnPlayer(%this)
All these places play the sound at the end of the lighting phase. All but in the function startgame, it will actually play twice. What I want is the sound to play when the player actually enters the game. Where is the best place to place my sfxPlay(); ??
I have also tried a trigger that plays the same way as putting my play in the functions above.
Thanks for any help.
#2
Edit to add: That didn't work any better. It still plays during the game loading screen. :-/
Edit again, this actually worked. I had another sound file that was interfering with it. Once I stopped that other sound, this worked perfectly. Thankyou. :-)
04/24/2008 (4:50 pm)
I'll give that a try. Thanks.Edit to add: That didn't work any better. It still plays during the game loading screen. :-/
Edit again, this actually worked. I had another sound file that was interfering with it. Once I stopped that other sound, this worked perfectly. Thankyou. :-)
Associate James Ford
Sickhead Games
Perhaps on your playscreen::onwake?