Two questionts about animation

hello every one, thank you in advance for your help.
I'm still expirmenting and I've tried to creat a punch animation and encounterd two problems.

  1. When I press the key I want the actor to complete the punch but insted it require me to hold the key.
  2. I have two different animations for punch which I want to be acctivated randomly, is there a way to do this ? (I have a way but it is really clumsy and uncomfortable)

Best Answer

  • ashtmjashtmj Posts: 405
    Accepted Answer

    add a new integer attribute to your actor called "behavior"

    Rule:

    when punch key is pressed and self.behavior = 0

    change self.behavior to random 1,2

    wrap each animation cycle in this rule

    Rule:

    if self.behavior = 0

    normal animation

    Rule:

    if self.behavior = 1

    punch animation type 1

    then add a timer, every 0.7 sec. (or however long the animation will last)
    change self self.behavior to 0

    Rule:

    if self.behavior = 2

    punch animation type 2

    then add a timer, every 0.7 sec. (or however long the animation will last)
    change self self.behavior to 0

    I hope this helps! let me know if you have any questions.
    also be sure to check out my gamesalad video tutorials for more tips and tricks.

    -Ash

Answers

  • MatanllMatanll Member Posts: 6

    Thank you very much, I will try it.
    Seems like you know the job I will be watching your vid

Sign In or Register to comment.