#bug player damage

1 messages · Page 1 of 1 (latest)

foggy stratus
#

Does the enemy happen to spawn in the player's space? 🤷

steep atlas
foggy stratus
#

Just checking

#

not sure what your timer does, but it seems to be calling the damage function. Would that be something that has to do with it?

steep atlas
#

would be better if i changed it so the enemy does the damage, not based on a timer

#

checked a bit with breakpoint, in the player script I have 'number_colliding_bodies', this is the amount of enemys colliding with the player to do damage

and then i have 2 connects in the _ready(), when they enter the collision 'number_colliding_bodies' goes +1
and -1 when they leave/die

but 'number_colliding_bodies' already goes +1 when the enemy spawns in, not when colliding with the enemy