Question about Platform

Get help using Construct 2

Post » Thu Sep 01, 2016 7:12 am

Hi guys,

I am currently making a tap and jump game. Everything will run itself, player only have to tap the screen to jump over the cliff and step on enemy in order to destroy it. The same goes to the enemy, but enemy will jump over the cliff itself.

When both the sprite are running (enemy moves faster than player), i tap and jump on the enemy, then enemy will be destroy, leaving a dead animation on the platform. The problem is, if i happen to jump on the enemy which is also jumping, the enemy will be destroyed on the sky, and the dead animation will be on the sky too, which is quite weird, how do I drop the enemy to platform from the sky after I jump on it? I'm using Platform behaviour for both sprite btw

Help please, thanks!
B
48
S
20
G
6
Posts: 71
Reputation: 6,470

Post » Thu Sep 01, 2016 7:23 am

could you just have the animation wait till the enemy hits the ground? isn't the platform gravity still affecting the enemy?

maybe use a boolean on the enemy 'AirDeath'.. it could stay false until
player jumps on enemy head AND enemy platform is NOT on ground -- set 'AirDeath' true

if AirDeath=True
set enemy.y to enemy.y + 6 (or whatever)

then when they land, have it set airdeath back false and run the death animation..

I'm tired, and I feel like there's probably a better solution.. but maybe that helps..

if not, got a capx we could look at?
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Sep 01, 2016 7:30 pm

@spacedoubt thank you for replying! But I'm sorry because I do not understand what are you saying.. I'm still quite new to Construct2 actually..

However, I had made a sample capx file on my another higher priority inquiry, could you give me some suggestion?

The game is as same as I mentioned earlier. When enemy on collision with player, the expected outcome is:

- Background and Block will stop
- Player and enemy will stop
- Wait 2 sec, restart layout

But the actual outcome when enemy on collision with player:

- Background and block din't stop
- Enemy and player move faster until enemy push player out of the layout
- Layout din't restart
- or -
- Enemy push player move faster few sec, then only expected outcome apply

My capx file: https://www.dropbox.com/s/0avf07x0m4m0y ... .capx?dl=0
B
48
S
20
G
6
Posts: 71
Reputation: 6,470


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 6 guests