Random animation

EagleoneEagleone Member Posts: 97
edited November -1 in Working with GS (Mac)
Hi guys, quick question regarding random animation...

I have an actor on the screen and I want him to blink randomly. I've imported the "blink animation files" (there are total of 5), and I did a bit of research on how to do it but haven't quiet nailed it. I realize there are a few different ways of doing this; some create and integer attribute, some a boolean and I've tried both ways but still can't get around it. If anyone could assist me with this matter I'd appreciate it.

Thanks!

Comments

  • ShineyGamesShineyGames Member Posts: 157
    make an self attribute blink (real,integer)
    make rule timer

    timer
    every xsec (run to completion)
    change self blink to random (1,5)

    then but rules in this rule

    if attribute blink =1
    animate

    if attribute blink=2
    animate

    ect

    hope that helps
  • EagleoneEagleone Member Posts: 97
    Thanks ShineyGames, works well, not really random though, the actor blinks every 5 seconds, only sometimes there is more than 5 seconds between blinks but most of the time the actor blinks every 5 seconds. That's ok though, I'm satisfied with this.

    Thank you very much for your help once again!
  • ShineyGamesShineyGames Member Posts: 157
    Then all you have to do is make the timer random
    the blinks are now random :)

    in the timer put
    Every random(5,20)

    then you will have random blinks at random times :)
  • EagleoneEagleone Member Posts: 97
    As you can see I still have a lot to learn, thank you very much you have saved me a ton of time. Works perfect now!
  • EagleoneEagleone Member Posts: 97
    Another quick question...

    All of the above works well, the blinks are happening in random order.

    Now I need the exact same thing happening for another actor on the screen so I made a duplicate of the first actor, but I changed the timer in the second actor so both actors don't blink at the same time, but both actors are still blinking at the same time. How is this happening since the timers in the two actors are different or am I missing something once again?
  • EagleoneEagleone Member Posts: 97
    Ok I have it sorted. I just created another blink attribute like the first one and named it blink2. I used this attribute with the second actor and now both actors are blinking randomly and they're not bliking at the same time. I did try to use the first blink attribute with the second actor and even though I changed the timers in both actors, both actors were still blinking at the same time. Just thought I'd share this in case anyone else come across the same issue.
  • ShineyGamesShineyGames Member Posts: 157
    Don't Know What You Have done but It should not
    did you use a Self attribute?
    not a globe one

    there are the main attributes and self attributes you need to make the blink attribute a self one so each actor has there own

    do a search of self attributes to see were they are :)
    let me know how you get on
  • EagleoneEagleone Member Posts: 97
    Ahh I see... ok. I understand what you mean but can not tell you if I used a global or a self attribute, I'm not sure how to check, but I understand what needs to be done. I'll do a search on self attributes and see what needs to be done in order to choose that particular option.

    Sorry about all the n00b questions, but as I said I'm still learning and slowly getting the hang of it.

    You've been a great help though, thank you very much sir!
  • ShineyGamesShineyGames Member Posts: 157
    No probs i was noob too a few months ago to :)

    If you have an i pad/iphonr there a great textbook app its not to cheap but well worth it and a good read.
    Forgot the name of it but one off the members here wrote it

    Am shore a search for gamesalad textbook on the app stor will bring it up

    PS it very upto date finger crossed he will keep it up to date
  • EagleoneEagleone Member Posts: 97
    Sounds good, will def search on the app store for that app, certainly seems useful. Just found a few tutorials on youtube in regards to how to make global/self attributes so now everything is clear and now I have everything working. Thanks heaps once again, you're a champ!
Sign In or Register to comment.