0 Favourites

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

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,490
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,819
minhcuong's avatar
minhcuong
Unread hot topic
134 20,403
KTML5's avatar
KTML5