jumping on the enemy problem

Get help using Construct 2

Post » Thu Jun 20, 2013 3:50 pm


Hi.

I'm following Ashley's 'How to make a Platform game' Tutorial,
and I'm a little stuck.

Ashley's tutorial code for jumping on the enemy looks like this:



mine looks like this,

and results in this:




Can anybody see where I've gone astray?

thanks
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 20, 2013 4:04 pm

Hmm, looks fine to me. Any chance of uploading your file to dropbox and post a link here so I can have a look?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 4:28 pm

Try removing the "Platform is falling" (?)

It may be because when the collision happens , the player is on the enemy , therefore , it detects it as on land ...

Also , In Ashleys Tutorial , is the Slime does the slime have a solid or platform behavior ?Whiteclaws2013-06-20 16:30:55
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Thu Jun 20, 2013 4:31 pm

@Whiteclaws
Well, his character IS falling in the gif, so it should work. And he probably doesn't want you to be able to kill the enemy at the start of a jump (on the way up).
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 4:33 pm

Hmmm , it may be , the best solution would be uploading a small capx , with all your player/slime-related , it may be something in your behaviors or code ...
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Thu Jun 20, 2013 5:08 pm

B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 20, 2013 5:27 pm

Yep , as I suspected , just remove the solid behavior from the enemy sprite and everything will work fine !
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Thu Jun 20, 2013 5:32 pm

Oh man!

And that solves another problem where I had 2 enemies patroling the same area and they were getting stuck.

Thank you for your efforts.
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 20, 2013 5:33 pm

Ah, yeah the platform behaviour will make your objects collide automatically, no need to add solid behaviour, only add it to ground and wall objects. (and similar things)

This is also true for the 8dir behaviour and the car behaviour.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests