I need a Crushing event!

This forum is currently in read-only mode.
  • Hey all,

    I am working on the classic platformer scenario when the ceiling is coming down and the floor is coming up and you are stuck in between. I want a crushing event of some sort. My player box is about 128px tall by 64px wide. I have three types of crushers where the ceiling comes down, (like in Mario) where the floor comes up, and where they both come together. I am controlling the moving crushers using Custom Movement. But, without a crushing event my playerbox gets teleported to a safe area instead of being crushed.

    Currently i just deal with the teleporting problem as a temporary glitch. I think i can keep it from happening, i am just not sure how. I also have the same problem when my player is crouched and enters a lower area. If you release crouch then you teleport to the nearest solid play area. Its actually kind of neat, but it can be unpredictable.

    I would like to give the player a bit of squish as the ceiling closes in, say 10px smaller than their bounding box. Then, after that point the player is crushed and killed. The bounding box is linked to crouching too so when he is crouched he should still be crushed. Maybe i could even force the player to crouch if the area is too small?

    I am trying to find a good way to do this, and they all involve specific Y positions for every crushing object, along with a death zone trigger within the crush region. So basically if the player is in the crush region, and the Y position of the crushing block is beyond a certain point, then kill the player. I have to manually figure out for the Y position for each crusher. I want to find a way to use a single crusher object and just copy it. Now I am creating unique objects and writing specific events for each and every crusher. It works... but it is clumsy and difficult to manipulate.

    Has anyone else done any work with crushing???

    Anyway, any other input would be very useful!


  • With both objects solid they will teleport. If you turn solid off on the 'crushers' you can overlap it with the player and check then with a 'overlaps player by 10' then 'destroy' sort of event. If you have it force a crouch you will need to check if the player is crouching before killing them.

    You can definitely force a crouch if the area becomes too small, but you may need to some extra checks for that.

  • That is an interesting idea. I am going to try it out.



  • The problem with turning my walls into non solids is that the player just runs right over them. I actually got the logic for one working well... except for this strange "teleporting" thing. Is there anyway to detect the solid intersect event and reroute it?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What I have in my game is just "overlap at offset +1 then Destroy player"

    It never actually overlaps. You could do the same if you are willing to concede the wall overlapping the player slightly.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)