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
55
S
24
G
13
Posts: 765
Reputation: 12,571

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
55
S
24
G
13
Posts: 765
Reputation: 12,571

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
55
S
24
G
13
Posts: 765
Reputation: 12,571


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests