Triggering Animations

HaleyFHaleyF Member Posts: 7
edited April 2012 in Working with GS (Mac)
Hey, I'm a super noob so I apologize if this has been answered already. I searched the forum to no avail.

I'm wondering the best way to trigger an animation when 2 actors collide. Say you're character is a man, and there's a woman standing around, when you walk into her how do I trigger an animation of them dancing. Ideally that would appear overtop of them and then disappear upon completion.

Thanks!!!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    are the animation images showing both man and woman?
    if so you can have only one actor run the animation
    best to pick the actor that has the least number of rules

    and to this action from constantly triggering:

    a boolean gameAttribute: danceDone

    on womanActor:
    Rule: when (All)
    Event: overlaps/collides with actor man
    Attribute: game.danceDone is false
    --Animate
    --Rule: when
    --a Timer or Rule
    ---changeAttribute: self.Image To: correctImage for woman
    ---changeAttribute: game.danceDone To: true

    on manActor:
    Rule: when
    Event: overlaps/collides with actor woman
    Attribute: game.danceDone is false
    --changeAttribute: self.Color.Alpha To: 0
    Otherwise: changeAttribute: self.Color.Alpha To: 1

    sound like fun! … @HaleyF … Eadweard Muybridge's original movie dance
    image

    image MH

Answers

Sign In or Register to comment.