Code: Select all
plotscript, On Keypress Handler 0, begin
if(hero is walking(me) == false) then(
set hero speed(me, 4)
#Set leader to walking
If (hero by slot (0) == hero:Taras) then(
set hero picture (0, 44)
) else if (hero by slot (0) == hero:Antonina) then(
set hero picture (0, 47)
) else if (hero by slot (0) == hero:Rodion) then(
set hero picture (0, 37)
)
### S ###
if(key is pressed(key:S)) then(
set hero speed(me, 5)
#Set leader to running
If (hero by slot (0) == hero:Taras) then(
set hero picture (0, 99)
) else if (hero by slot (0) == hero:Antonina) then(
set hero picture (0, 100)
) else if (hero by slot (0) == hero:Rodion) then(
set hero picture (0, 98)
)
)
)...
To attempt to fix this I made a reset code which was called in my autorun while loop, it looked like this:
Code: Select all
script, resetRun, begin
if(hero is walking(me) == false) then(
#Set leader to walking
If (hero by slot (0) == hero:Taras) then(
set hero picture (0, 44)
) else if (hero by slot (0) == hero:Antonina) then(
set hero picture (0, 47)
) else if (hero by slot (0) == hero:Rodion) then(
set hero picture (0, 37)
)
)
end
Can anyone suggest an alternate way of handling this? Or point out any mistake if I made one?