0 votes

I'am new at coding and i'am trying to make when the player take damage, he turns invensible for short time and is pushed away. I already put the life and damage taken, but not the hard-frame.

Godot version 3.1.2
in Engine by (30 points)
edited by

1 Answer

+1 vote

You can use a Timer for that. Whenever the invulnerability time should start, (re)start the Timer. Then, when the player is hit, check if the invulnerability is over with the Timer's time_left property.

by (2,482 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.