How do I trigger animation?

Get help using Construct 2

Post » Tue Apr 28, 2015 8:50 pm

I am making a mini game where my character runs through a city and i want the character to trigger birds to fly in distress. However, I don't know how to make that happen because everytime i think i scripted it right, the animation is playing before the character gets there. Please help?!

Thank You.

Kayleigh.
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 28, 2015 8:55 pm

You can create an invisible box and use it as a trigger where you want the animation to happen and script it like "on collision with player > play animation".

But there are many ways to do it so that was just an example :)
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Tue Apr 28, 2015 9:03 pm

I tried that and it still wouldn't work aha
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 28, 2015 9:32 pm

Do you have collisions enabled and have you checked the collision polygon on the sprites?

And is the animation correct?

Hard to say what the problem is without the capx
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Tue Apr 28, 2015 9:42 pm

oh, i figured out what was the issue. I basically did System>OnStartOfLayout/Bird>StopAnimation and with what you said, it finally plays when the character crosses aha

Thank You!
B
3
Posts: 6
Reputation: 187

Post » Wed Apr 29, 2015 1:54 am

Ok, glad you found the problem. Good luck with your project! :D
B
52
S
22
G
12
Posts: 725
Reputation: 11,716


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983 and 13 guests