Randomizing sound effect when actors collide
Chunkypixels
Member Posts: 1,114
hi...
I'd like to make my actor trigger audio from a selection of 5 or more different sound effects when it collides with another actor.
I currently have it playing a single sound ok when it collides, but cant seem to find any options for making it choose from a selection instead. Does anyone know how I'd do this?
thanks.....
I'd like to make my actor trigger audio from a selection of 5 or more different sound effects when it collides with another actor.
I currently have it playing a single sound ok when it collides, but cant seem to find any options for making it choose from a selection instead. Does anyone know how I'd do this?
thanks.....
Comments
ie:
Behavior:
randNum := rand(1,x) where x is the number of sounds
Rule:
if randNum == 1:
-- play sound 1
Rule:
if randNum == 2:
-- play sound 2
etc.
I'll give that a play with.
I am making a "Simon" type game and I can't figure out how to randomize colors and patterns.
If you are unfamiliar with simon, its a game where there are 4 colors and players have to repeat a sequence of random patterns (hopefully I am making myself clear) and immitate whatever the game spits out.
Gave me the random triggered sounds i required, so should be transferable to other random events.
thanks again Cat