How do you make a collision event only happen once?

Get help using Construct 2

Post » Fri Aug 14, 2015 7:11 pm

My character has another animation when it jumps. I need to make it so once it touches the ground it should go back to it's original animation. I don't want it to go the original animation all time it touches the ground since it should be able to go to other animations while standing on the ground. The on collision whit another object event makes it so so long the character touches the ground it can't do any other animation. The same goes for platform on floor event. Is there a way to make it so the collision only switches the animation everytime the character has jumped and reached the ground and not again until the character jumps again?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Fri Aug 14, 2015 10:41 pm

Seriously what? I know a lot about platformer behaviour, but I don't understand what do you mean. Could you explain it more simple?
B
11
S
4
Posts: 53
Reputation: 1,148

Post » Fri Aug 14, 2015 10:44 pm

Create an instance variable called "recover" and set it to boolean.

Use 'on landed' would be trigger action once such as playing "recoil" animation. Add wait action (1 or 2 seconds) then set recover to true so we know the condition has switched. You also can make sure after the "recoil" animation finished, another animation is being played while is on floor.
ImageImage
B
111
S
51
G
24
Posts: 786
Reputation: 23,392

Post » Sat Aug 15, 2015 2:11 am

alextro wrote:Create an instance variable called "recover" and set it to boolean.

Use 'on landed' would be trigger action once such as playing "recoil" animation. Add wait action (1 or 2 seconds) then set recover to true so we know the condition has switched. You also can make sure after the "recoil" animation finished, another animation is being played while is on floor.



It took alot of thinking and trying but it worked in the end. Thanks!
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Sat Aug 15, 2015 6:20 pm

Congrats then. Another platformer mechanic should not too hard to achieve when you understand the logic.
ImageImage
B
111
S
51
G
24
Posts: 786
Reputation: 23,392


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests