How do I make a player get smashed?

Get help using Construct 2

Post » Sun Sep 11, 2016 10:00 am

So I'm trying to create the mechanics for a dropping block enemy.

So far I managed to make the player get smashed if it sits on the block and get smashed against the roof, but doing the same approach I can't do it the same for the floor.

This is an example capx of the blocks: https://www.dropbox.com/s/a9t9qr16v1uyh ... .capx?dl=0

Basically I have a smashed function that plays an animation, player dies and restars the layout.

Managed to make it work when smashed against the top like so:

Player is overlapping BRICKENEMY at offset 0,1
>> Player is overlapping Tilemap at offset 0,-1. - Call function Smashed

It works "OK". The animation keeps looping and if I trigger once it won't play any animation but will restart the layout.

Can't do the same whenever I want it smashed against the floor. It just doesn't play any animation. I guess in this case I have to call it in a different way.

I basically need a fix for the animation looping for the "roof smashed" and I guess I need a different way to trigger the floor smashing. Any help so appreciated.

Thank you!
B
14
S
5
Posts: 252
Reputation: 1,713

Post » Sun Sep 11, 2016 6:30 pm

You've posted a capx without the issue in it which is a bit strange. I'm not seeing a player or any animations.
B
48
S
19
G
84
Posts: 2,289
Reputation: 49,957

Post » Mon Sep 12, 2016 11:54 am

Make on collision and within an if comparing the Y axis of the block with the Y axis of the character. If the block Y axis is smaller than the character block is then over.

Image

It can be improved. But this is the basis.
Hi I am Samuel :)

My google play
B
43
S
10
G
1
Posts: 126
Reputation: 3,318

Post » Mon Sep 12, 2016 2:14 pm

martdsam wrote:Make on collision and within an if comparing the Y axis of the block with the Y axis of the character. If the block Y axis is smaller than the character block is then over.

Image

It can be improved. But this is the basis.


Thanks. I ended up taking a different approach yesterday. Works so I'm cool with it. Thanks for your help tho, appreciated!
B
14
S
5
Posts: 252
Reputation: 1,713


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests