So when the enemy hits the “1” block it changes it’s varible to 1 meaning it will move left. Then when the enemy hits the “2” block it changes the variable to 0 meaning it will move to the right.
But for some reason, when i run the game, the enemy does what it’s supposed to do and walks back and fourth but after a while the enemy ignores the collision and just walks through it.
as im writing this, ive been trying to get a clip of it as proof but it doesnt seem to be happening even though i havent changed the code since it was happening before. I still want to see if anyone can help just incase it happens again
Thank you for reading!