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

Get help using Construct 2

Post » Fri Nov 29, 2013 2:09 am

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!

Posts: 2
Reputation: 154

Post » Fri Nov 29, 2013 2:43 am

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.
Posts: 2,341
Reputation: 52,693

Post » Fri Nov 29, 2013 11:31 pm

Thank you @Plinkie!
Posts: 2
Reputation: 154

Return to How do I....?

Who is online

Users browsing this forum: IGDev, Metathronos and 12 guests