CullenDAvello (18)

i have a function on lines 93 through 97 that i want to only run every second i have it so when the player touches the enemy he loses 1 health but its doing it wayyy to fast as soon as i touch the enemy i lose all my health
here's my game

You are viewing a single comment. View All
malvoliothegood (428)

I have had this problem when making games using JavaScript. I have solved it by instantly moving the player away from the collision - it need not be by much.