Skip to content

How do I add a health system with spikes that reset the player?

I want spikes that damage or kill the player and send them back to a safe spot, plus a health bar. How do I add that?

Category: Controls & physics

Answer from Cinevva Team ✓ Accepted

Ask for the pieces by name so each one is wired up: "add a health system with a health bar, add spikes that deal damage on contact, and respawn the player at the last safe checkpoint when health hits zero." Mention how much damage spikes do and whether you want instant death or chip damage. If you want brief invincibility after a hit so the player isn't stuck taking repeated damage, ask for invincibility frames too.


Join the live discussion or ask your own question →