I'm trying to create a rather unorthodox health system that revolves around the player damaging themselves through a specific input, while also being able to heal themselves through another specific input. I've been following Game Endeavor's video on the subject, but the issue is that he doesn't give an explanation on how to actually take damage. So how exactly should I go about doing that, especially when I want to map damage to the player? Here's the video for reference:

Didn't watch the video but you should use the input or _unhandled_input function to detect the key press and then subtract or add health.

@exuin said: Didn't watch the video but you should use the input or _unhandled_input function to detect the key press and then subtract or add health.

This will work but to have more control he should use is_action_pressed and then have a timer that takes away the health amount however many seconds he's moving so the feature works more consistently.

2 years later