So for my first game in godot I've been making a platformer. I have an area2d with a death script collisionshape2d as a child. The code for the script is
(sorry I can't make the sample code feature work)
var deaths = 0
func onbodyentered(body :PhysicsBody2D):
deaths = deaths + 1
This resets the player as I want, but what's printed in the console is always 1, no matter how many times the player dies. What am I doing wrong?