How do you make an enemy try to jump on the player?

Get help using Construct 2

Post » Sun Oct 11, 2015 9:39 pm

The enemy is supposed to jump and then try to fall on the player. I tried many things but the enemy always seem to miss the player. So how do you make it aim for you successfully?
Last edited by Calfuso on Mon Oct 12, 2015 10:03 am, edited 1 time in total.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Oct 12, 2015 7:16 am

Calfuso wrote:The enemy is supposed to jump and then try to fall on the player. I tried any things but the enemy always seem to miss the player. So how do you make it aim for you successfully?


I would like an anwer to this please.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Oct 12, 2015 7:20 am

The problem here is the jump? Or the fall?

A little more info could help.

Maybe a screenshot of your event list, for the jump/fall?
B
4
S
1
G
1
Posts: 33
Reputation: 714

Post » Mon Oct 12, 2015 10:02 am

yodason45 wrote:The problem here is the jump? Or the fall?

A little more info could help.

Maybe a screenshot of your event list, for the jump/fall?


I think the problem is both the fall and the jump since the enemy need to aim for the player in both situations otherwise it will havw trouble jumping on the player no matter what.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Oct 12, 2015 10:03 am

Calfuso wrote:The enemy is supposed to jump and then try to fall on the player. I tried many things but the enemy always seem to miss the player. So how do you make it aim for you successfully?
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Mon Oct 12, 2015 10:05 am

you mean stomp action? like mario jumping on mushroms?

if your using platformer behavior for jumping and control... u can easy do this by adding 2 conditions on colision with enemy and detect if the main player is above the enemy... so the conditions wold be

1 on collision with enemy
2 is mainplayer falling ...

action destroy enemy


it may not work properly ... but the main idea is to calculate the main player position when he is above ... also if u using platformer behavior.. the only way you can make things solid, so the main actor can behave, like he hit something solid is by adding the solid behavior to other things in game...

i think there is a platformer example around forum also.. doing exactly those things. ..
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271


Return to How do I....?

Who is online

Users browsing this forum: Fradno and 9 guests