Can you stop moving solid objects from pushing the player?

Get help using Construct 2

Post » Mon Jul 24, 2017 2:35 pm

In my game, the player has a platform behaviour. Because of this, moving solid objects push the player out of the way. I have crushing blocks that kill the player, that work for the most part, but sometimes pushes you out of the way instead of crushing you. Is there a way to stop it? If not, then it's fine.
B
24
S
9
Posts: 112
Reputation: 2,010

Post » Mon Jul 24, 2017 5:31 pm

Maybe just change the object event, make it so when the crusher is in collision with the player, the player to die, and add a Crushed animation to the player. You can also delay the crush death by adding a wait condition in the action like 0.2 sec, and before that disable the player movement so it looks more real.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Tue Jul 25, 2017 12:25 am

imhotep22 wrote:Maybe just change the object event, make it so when the crusher is in collision with the player, the player to die, and add a Crushed animation to the player. You can also delay the crush death by adding a wait condition in the action like 0.2 sec, and before that disable the player movement so it looks more real.


"make it so when the crusher is in collision with the player, the player to die" - If I did that then the player would die once they touched it, which isn't what I want. I just don't want the player to be moved by the crusher.
B
24
S
9
Posts: 112
Reputation: 2,010

Post » Tue Jul 25, 2017 1:32 am

Can you disable solid behaviour for the object when you detect that it's actually crushing the player?

You can set a boolean instance variable for the player perhaps, and when they're being "crushed" then disable solid on the crusher - and use other events to control the position/size of the player to control the crush "mechanic".

I guess it's a little difficult to make a suggestion without seeing how your current mechanics are working, and what you're wanting to achieve cosmetically.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Fri Jul 28, 2017 7:26 pm

SoldjahBoy wrote:Can you disable solid behaviour for the object when you detect that it's actually crushing the player?

You can set a boolean instance variable for the player perhaps, and when they're being "crushed" then disable solid on the crusher - and use other events to control the position/size of the player to control the crush "mechanic".

I guess it's a little difficult to make a suggestion without seeing how your current mechanics are working, and what you're wanting to achieve cosmetically.

~Sol

Sorry it took me so long to respond... This sounds like a great idea. In my game you pretty much just explode once you're crushed, so you don't really look crushed or anything. This will work just fine.
B
24
S
9
Posts: 112
Reputation: 2,010

Post » Mon Jul 31, 2017 2:47 am

All good! Glad it will work for you :D

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests