how to stop a particular sound from playing on or off?
I am not using destroy and spawn anymore, so a blast animation is placed outside the scene, problem is every time it starts a scene or resets it, the explosion sound starts playing, how do I stop a particular sound from playing, till the time it is not called for?
Comments
@wickedsunny
Hi, you ideally don't want your animation to run either until it's placed on-screen....
A simple boolean attribute acting as a switch will do it; let's call it BoomTime
In your off-screen actor, put in its Rules:
Rule: When BoomTime is true
----the following change of coordinates I'm presuming you've already got, to place the explosion on-screen when ready....
Change Attribute self.Position.x to ??
Change Attribute self.Position.y to ??
Animate Behaviour
Play Sound Behaviour
Timer: After ?? seconds
Change Attribute BoomTime to false
Change Attribute self.Position.x to -50 --or whatever, to place it back off screen
Change Attribute self.Position.y to 0
----
Now when its ready to play, (on a collision, I guess?) put a rule in one of your on-screen actors: Change Attribute BoomTime to true. That's it roughly.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps