Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ending a Looping sound [NEED HELP]
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#8
RE: Ending a Looping sound [NEED HELP]

Create a boolean variable for each timer, and check it's state before re-adding the timer in the callback function. You can then just set the boolean var to false when you don't want the sound to loop anymore, i.e on collision with some script area in your case.

If you want to stop the sounds as soon as this happens, couple that with a StopSound() call, and a RemoveTimer() call. However, these last two steps shouldn't really be necessary, as unless your sound is really long, it just "cutting out" will sound unnatural and perhaps break immersion - it may be better to just stop the loop, and let the sound finish it's last play using the method outlined in the first paragraph.
(This post was last modified: 05-09-2011, 01:16 AM by Apjjm.)
05-09-2011, 12:52 AM
Find


Messages In This Thread
Ending a Looping sound [NEED HELP] - by Simpanra - 05-08-2011, 07:52 PM
RE: Ending a Looping sound [NEED HELP] - by Apjjm - 05-09-2011, 12:52 AM
RE: Ending a Looping sound [NEED HELP] - by Apjjm - 05-09-2011, 09:44 AM
RE: Ending a Looping sound [NEED HELP] - by Kyle - 05-11-2011, 09:07 PM



Users browsing this thread: 1 Guest(s)