I'm having trouble with changing the movement of an enemy via numb variables.
<img src="http://i297.photobucket.com/albums/mm206/KillerFromCro/Movement_Test.jpg" border="0">
Move = 2 easily sets to Move = 1 when overlapping, but doesn't work vice versa.
Also using boolean works fine.
Your problem is about the same as in this topic.
The same solution applies, you have to set another variable that you will check to know if the value of Move has been changed already or not.
Develop games in your browser. Powerful, performant & highly capable.
Thanks, totally missed that thread.
In your case it seems to be a toggle
you don't need another variable, just a bit of math
Koopa: is overlapping flag
-> Koopa: set Move to 3-Koopa.Move
if move = 1 -> 3-1 = 2
if move = 2 -> 3-2 = 1
Works great, thanks.