Random Blinking Animation?

BackUpAndDownBackUpAndDown Member Posts: 685
edited November -1 in Working with GS (Mac)
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.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Theres a couple different ways heres one:

    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
  • entersimonentersimon Member, PRO Posts: 273
    Create a new attribute called Random and have it be an integer. Now make an actor that will control this randomization (or you can just put it in another actor, it's your choice how you organize things). Create a timer and say EVERY 1 second (or however often you want the randomizer to go) change attribute - Random to:

    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!
Sign In or Register to comment.