#bug player damage
1 messages · Page 1 of 1 (latest)
what do you mean?
they spawn away from the player
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?
so, now it is when an enemy collidse with the player than the timer starts and does damage every 0.5s or someting
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