collision sounds at start of scene
forklift
Member Posts: 386
I have a bunch of the same actors stacked on each other that are already touching when the scene starts. I want them to make noise when a collision occurs, but when i have the rule set like so:
when Actor1 touches/collides with Actor1(itself)
play sound
Since they're already touching at the start, i get this erruption of sounds as the actors settle ontop of each other.
How do I work around not playing a sound until after they're settled? It seems that I can't use the rule above to keep these things silent at first until they settle.
Note: I can't see them moving, but for at least 2 seconds they make sounds.
when Actor1 touches/collides with Actor1(itself)
play sound
Since they're already touching at the start, i get this erruption of sounds as the actors settle ontop of each other.
How do I work around not playing a sound until after they're settled? It seems that I can't use the rule above to keep these things silent at first until they settle.
Note: I can't see them moving, but for at least 2 seconds they make sounds.
Comments
timer after 3 run to completion (this needs to be checked from what i can remember)
when Actor1 touches/collides with Actor1(itself)
play sound
This has to be some kind of bug. I even set up other rules that made it impossible to be 'true' surrounding this sound. It still goes off on the start.
This is stupid.
Anyone know a way around this?
Maybe try a boolean attribute, so:
When all conditions are true
when Actor1 touches/collides with Actor1(itself)
when attribute SuchandSuch is true
play sound
with an off-screen actor with a Timer in the Rules,
after 3 seconds
change attribute SuchandSuch to true.
Can't see why that wouldn't work.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
game has a boolean called game.sound
2 actors: ground & box both have collision rules for eachother
1 instance: timer after 3 seconds set game.sound true
box has a rule: when game.sound = true, play sound on collision with ground & box
as soon as the timer is over, even after all the boxes have settled into place, the sound goes off!
Help!
Get rid of the timer
set the volume on the sounds to 0, then have a timer which after 3 seconds changes the volume to 1.
this should still let the initial sound play, but you won't be able to hear it as the volume is 0.
Like i said though, im not sure if you can control the volume with a rule, but i think you can.
cheers
Don't add a timer when you already have the self.time running anyways.
Tshirtbooth, that method does work, thank you.
I've been trying for four hours (prob longer) to figure it out on my own. No luck. How do you
"at the end of a level i change device.audio.sound to 0
then at the beginning of the level i change device.audio.sound to 1 AFTER 1.5 seconds:"
Is it done through rules in an actor? or some attribute of the scene? Thanks.