Overlapping player and enemy sprite immediately loses all lives inside of change life by -1

Is there a solution or fix to this? Please help!

4 Likes

The game checks for an overlap every 1/30th of a second, or 30 times a second. If you have the player lose a life when it is overlapping an enemy, it will actually be overlapping that enemy 30 times a second and will lose its lives that fast! My recommendation is to move the player sprite out of the way of the enemy sprite after being hit, like knockback.

1 Like

Try putting a ‘pause 100ms’ block after taking away a life

well you can use the

Timer Extention

microsoft/arcade-timers

end do this


however you will lose life once evrey (“The time you put in ms” in this case “500ms”)
if ever you need more help come

Here

help with pixel art end math issue's

@Tbnb Welcome to the Makecode forums! (I hope your gonna love it here just as much as me!) you should make it so that the enemy sprite gets destroyed when it touches the player

YES. ANOTHER CODER

best day of by life