Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to get actor to die when squished

stan_mcginnisstan_mcginnis Posts: 17Member, BASIC
edited June 2018 in Working with GS (Mac)

I am making a platformer game where the player can ride a moving platform, which travels horizontally, between two still platforms. I want the player to die if he gets crushed in between the moving platform and the still platform, instead of just glitching through the moving platform. I have tried many different ways but can never get the player to consistently die when crushed.

Best Answers

  • stan_mcginnisstan_mcginnis Posts: 17Member, BASIC
    edited September 2018 Accepted Answer

    Thanks! oops didn't mean to mark this thank you comment as an answer..


  • Triangularity GamesTriangularity Games Founder/Owner MarylandPosts: 140Member

    You could have a rule something like:
    When the two platforms are colliding and the player.Y is below where it should be (i.e. below the platform.Y+(platform.height/2)
    ->Then here you can do whatever you want to the game...

    Something like this. Hopefully this helps.

  • stan_mcginnisstan_mcginnis Posts: 17Member, BASIC

    I already tried that, it makes they player die whenever they is touching the side of thr platform even if he is not getting squished.
    I tried doing this with a platform width too, but it didnt work because the platform width/2 only updates when the player is touching the moving platform so if the player touches it, waits until it moves a bit and then touches it again, they will die before the platform width/2 updates,

Sign In or Register to comment.