Random Blinking Animation?
![BackUpAndDown](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I have a simple short 2 frame animation that I want to play randomly. It sounds really simple but I can't get it looking how I want. It's a blinking animation so I want it looking as random as possible. Any help would be awesome, thanks.
GS should have a "random" behaviour. The random attribute can be a huge hassle and lead to a ton of unnecessary attributes.
GS should have a "random" behaviour. The random attribute can be a huge hassle and lead to a ton of unnecessary attributes.
Comments
Have a timer every random(1,10) seconds
change attribute self image to blinkimagename.png
then have a rule when attribute self image = blinkimage.png
timer after 1 second
change image to no blink image
you can replace the numbers in the random to whatever you want
cheers
click the e for expressions
click the white box after the text "insert function" and click random. Then set the minimum number you want and the maximum number you want.
Let's say you choose 1 as the min and 10 as the max.
Well, open up the actor that is going to be blinking and create a rule that says if attribute random >5 then:
Animate
::blinking animation, and make sure that the initial image is restored::
You can toggle with all of these variable to get the right look you're wanting. And it should be noted that you can use this same Random attribute to control other random action as well. This is why it's good to have a controller actor to use for the randomization. You could then have a different actor only blink when Random = 7. And another one can turn blue when Random = 2. And another actor can grow bigger if Random = 9. You get the picture.
Then you have an attribute to work with for many different randomizations, it just takes planning.
Best of luck to you and to me!