Platform game 'is falling' problem (solved)

Discussion and feedback on Construct 2

Post » Sun Sep 22, 2013 6:16 pm

Hi

I am new here :)

I have just started learning. Going through the 'How to make a platform game' tutotial, while testing away on my own.

I have a simple problem in a simple scenario:

PlayerBox -> On collision with Enemy
   PlayerBox -> Is falling -> Destroy Enemy

The problem is nothing happens with the enemy.

Example below works fine, but of course destroys enemy on every type of collision.

PlayerBox -> On collision with Enemy -> Destroy Enemy

capx file: http://www.ak47.dk/construct/projekt.capx

(edit: typo)thegrind2013-09-23 01:50:29
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Sun Sep 22, 2013 6:33 pm

Because the enemy is solid, the player isn't falling any more when it lands on the enemy - it's standing on it. You could check if player is overlapping enemy at offset (0, 1). Or compare their y values.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sun Sep 22, 2013 6:45 pm

I understand. Thank you very much!

I finally can proceed :D
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Mon Sep 23, 2013 2:29 am

You could also remove the solid behavior from the enemy.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Tue Sep 24, 2013 10:59 pm

Yes, that was what I chose to do

But thanks for the suggestion!
B
26
S
9
G
2
Posts: 78
Reputation: 2,524


Return to Construct 2 General

Who is online

Users browsing this forum: R0J0hound, vikuserro, zenox98 and 1 guest