Random Sound Generator
SevenNote
Member Posts: 0
In my game, I'm trying to generate a random sound upon clicking an actor. I set an integer for the scene known as (random sound). When I click the actor through The Change Attribute command I change the scene attribute (random sound). The Change Attribute command generates a random integer [random (1,7)]. A different sound is produced for each integer. However when the random number chosen is same as the previous number for example (1 and 1) the sound will not play again. It looks to player the game has crashed. How can you get the same sound to be played when the attribute has not changed by the change attribute.
If I could think of a command, It would be If change attribute generates a integer equal to the previous integer replay sound 1.
Can I do this by manipulating another attribute a boolean attribute or perhaps a table?
Thank you,
Seven Note.
If I could think of a command, It would be If change attribute generates a integer equal to the previous integer replay sound 1.
Can I do this by manipulating another attribute a boolean attribute or perhaps a table?
Thank you,
Seven Note.
Comments
I would put it in a timer for after 0 or after 0.1 with run to completion checked that way it works even if the button is not held long enough for the rule to run completely.