How do I only make animation play on 1st contact?

  • Hi everyone,

    For the life of me I can not work this out.

    I have a plant that I only want to 'grow' on the first contact with the player.

    I can make it appear to grow out of the ground when the player enters its hit box and stop on its final animation frame, but if the player leaves the hit box and re-enter it starts the growing animation again.

    I want it to grow on first contact, and stay grown!

    I have tried various ways, but I can't find anything that works.

    Currently I'm on this setup in the events which I got from some tutorial or another, but it still doesn't only play the one time ?_? :

    EDIT: Newbies can't post pics so I'll write it out I guess.

    Player | on collision with PLANT |

    System | repeat 1 times |

    LSystem| Trigger once | Plant| Set animation to "grow" (play from beggining)

    (that bold L denotes a linked event...)

    FYI I am quite the novice, any help would be super appreciated!

    ForestBear

  • Compare frame as a condition :

    On Collision With Plant (Cond: Plant is not playing last frame). You'll need to right-click invert the compare frame event.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you plinkie! <img src="smileys/smiley10.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)