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

Can someone help me i need to get this done by Saturday I need to make these enemies spawn over and over again not to much just like 5 I also need it to over lap to lower hp and points and also making the bullets damage. Could you also please add another level splash so when it hits the flag then a splash box says “time for level 2” that should be it thanks. Here is the link.

1 Like

@Nayansharma Here, you will find a lot of people willing to help you solve problems. What we do not do is finish assignments for others.

For help, please go ahead and start your own post with an accurate topic so that others can share their expertise to help you finish your game before your deadline.

3 Likes