Animations overlapping one another

ToecutterToecutter Member Posts: 19
edited July 2012 in Working with GS (Mac)
The main actor in my game has an idle 8 frame animation running at 12 fps. When another actor comes into contact with it an event happens causing a new 12 frame animation (running at 12fps) to play for 3 seconds. My problem is its trying to show both animations at the same time causing flickering. How do I stop the idle animation, let the new event animation play out and then return back to the idle animation? Thanks

Things are currently setup a follows:

Idle Animate (loop ticked, Restore actor ticked)

EVENT RULE
If actor collides with event actor
TIMER
For 3 seconds run to completion
Constrain Attribute (to stop my actor from moving)
Animate (12 frame event, loop ticked, Restore actor ticked)
Otherwise:
Idle Animate (loop ticked, Restore actor ticked)

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    @Toecutter … eliminate the 1st animateBehavior … as it is always active

    and, you already have this behavior in the Otherwise: section of your eventRule

    though I can see why the Timer behavior is causing problems
    as the computer has no idea when to start doing animation1 again
    and when that collision persists … animation1 will never be triggered

    so the eventTriggering actor should be destroyed after 3 seconds
    Rule: when
    Event: overlaps or collides with actor of type idleActor
    -Timer After: 3 seconds
    --destroyBehavior

    on idleActor:
    Rule: when
    Event: overlaps or collides with actor of type eventActor
    -Animation2
    Otherwise:
    Animation1

    imageMH

Answers

  • ToecutterToecutter Member Posts: 19
    That doesn't seem to work (maybe I'm not following your instructions correctly). Tried making a quick demo to show you what I mean...
    https://www.dropbox.com/sh/60a9diedl5sm243/IS1-Kg14lZ
    The 3rd actor is to show what animation should be displayed when actor 1 collides with actor 2.
  • Hey, Have you figured out how to fix this. I seem to be running into the same problem. My idle animation is conflicting with my jump animation for some reason.
Sign In or Register to comment.