Stencyl 3.4.0 is now out. Get it now!

Randomize sounds or events

RyanZGrieco

  • Posts: 12
When an event can have several separate sounds, is there a way to randomize which sound is played when the event occurs?



Majora64

  • *
  • Posts: 498
This is how I handle random events, hope it helps!
'Create Sound' is a number attribute btw

RyanZGrieco

  • Posts: 12
Is "Create Sound" a Boolean in this example? It will not allow me to attach the Random Integer to this Boolean Setter.

This is how I handle random events, hope it helps!
'Create Sound' is a number attribute btw

Majora64

  • *
  • Posts: 498
Nah it's a Number attribute, not a Boolean. When you create a new attribute scroll down, you should see "number" as an option.

Luyren

  • *
  • Posts: 1370
Alternative attached.
Working.