How do I get player to take wall damage while touching/still on wall overtime?

0 favourites
  • 6 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • Hey guys, im simply trying to get my player to take damage while they are still on the wall or touching it. When they are off the wall, player won't take damage. Im using a timer behavior for my player when they do touch the wall, it seems to partially work. It will take the damage, but when im off the wall, it continues to take damage and kills the player. Im just simply trying to make it take the damage while touching, and stop taking damage after player is no longer on/touching the wall. Any help on this? Im also trying to take a snapshot so I can upload it here for yall to see my codiing, but it dont seem to work.

  • You can do it without the timer behaviour by using:

    is player overlapping wall

    Every X seconds - subtract X amount from player.health

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, I will try that.

  • It don't seem to work. It works when my player is overlapping the background of the level, but not the walls in the level. They have solid behavior so, the player won't be able to overlap it anyways. Is there a way to do this such as "on touch" or "touching" wall/object? "On Collision" don't seem to work as well for this.

  • You can set up overlap at offset events or create a second sprite identical to the player size. Reduce the player sprite's collision polygons by 1px and pin the second sprite with the normal collision polygon to it. Use the second sprite in the overlap check with the wall.

    Example: onedrive.live.com/redir

  • Thank you, it works!

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