How do I stop platform behavior remembering it's momentum?

Get help using Construct 2

Post » Mon Dec 29, 2014 3:44 pm

I'm sure that this must be a very simple thing to do, but I appear to be having a little issue with using the platform behavior with enemy movement.

Basically the enemies have the platform behavior to control them. Upon the player attacking an enemy on the ground it's not a problem, but if the enemy is attacked in the air, whilst they're jumping over the player, I want them to stop their current momentum and fall down to the ground. The problem is, I can't seem to get this to work. They just keep going along their current trajectory. Disabling the behavior just stops them dead in their tracks and ignores gravity. Disabling and re-enabling the behavior just resumes the trajectory too.

Is this a case of needing another behavior attached to the enemies, that it switches to upon them being attacked?
B
3
Posts: 14
Reputation: 203

Post » Mon Dec 29, 2014 4:56 pm

disable - set gravity and then resume as needed
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Mon Dec 29, 2014 6:19 pm

Sounds like you just need to set the enemy's VectorX to 0 when it's hit.
B
4
S
1
Posts: 2
Reputation: 258

Post » Tue Dec 30, 2014 10:34 am

kyuzo wrote:Sounds like you just need to set the enemy's VectorX to 0 when it's hit.


This sorted the issue out perfectly! Many thanks Kyuzo :D
B
3
Posts: 14
Reputation: 203


Return to How do I....?

Who is online

Users browsing this forum: 25games, Artcadev, brunopalermo, MaxxMunnn, mcscooter, Soluna Software and 26 guests