Mabye its because I'm really tird from staying up late every night latley pumeling code for a new project but I desperately need help with this code.
It consists of 4 sprites.
1) Hero is Standing 2) Walkup1
3) Walkup middle 4) Walkup 2
#### I want the code to run through the sprites as the hero walks. Starts from Standing (13) to Walkup1 (15) then to Walkup middle (14), then to Walkup 2 (16), then back to Walkup middle (14) and back to (15) and starts all over again. (Like if the hero has 3 walkabout animations)
Code gives me no issues, goes from sprite (13) through to (16) as I want it to. But when it goes back to (14) again for the second time and I want it now to go back to (15) (If walkMid = true [Meaning its already been passed the middlesprite]) but instead it still assumes that (WalkMid = False) and takes me back to (16) and just goes 16, 14, 16 , 14, 16, 14 till I quit the game.
Please help! The actual code is below.
variable (WALKMID)
If ((get sprite set number (HEROBOY))==(13)) then, begin
replace small enemy sprite (HEROBOY, 15, 5)
WALKMID := false
end, else, begin
If ((get sprite set number (HEROBOY))==(15)) then, begin
replace small enemy sprite (HEROBOY, 14, 5)
end, else, begin
If ((get sprite set number (HEROBOY))==(14)) then, begin
If ((WALKMID)==(FALSE)) then, begin
replace small enemy sprite (HEROBOY, 16, 5)
WALKMID := True
end, else, begin
replace small enemy sprite (HEROBOY, 15, 5)
WALKMID := false
end
end, else, begin
If ((get sprite set number (HEROBOY))==(16)) then, begin
replace small enemy sprite (HEROBOY, 14, 5)
end
end
end
end



