How do I make "drowning" for water/liquids for a platformer?

0 favourites
  • 4 posts
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • I had the idea to make a scrolling platformer that has you jumping from spinning wheels for as long as you can without dying. Originally I had the idea to have slowly rising lava at the bottom that would destroy the player sprite on collision, but I showed the demo to a friend and said that was really similar to a flash game that he played once. So we both came up with the idea of water that doesn't instantly kill you, but lowers your jump height and would destroy the player sprite after say, 6-10 seconds. I'm not sure how I could do this though.

  • If you have the trigger >PlayerSprite is overlapping WaterSprite< and the trigger >Wait 6-10 seconds< as a sub event that starts when trigger one is active next to the second trigger do what your planing for the drowning. Example, add the drowning animation and set player health to 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Or if you want them to only drown when they are below the surface of the water you can put the image point at the top and then test to see if teh players Y coordinate is below the waters Y coordinate. Or Put an invisible sprite at the water level and then trigger the drowning behavior when the player's Y is below the invisible sprites Y and they are overlapping the water sprite.

  • To make the jump and walk more slow on the water :

    player is overlapping water --- set jump to 300

    Else ----- set jump to 600

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