The 'step()' procedure strangely returns a value of 0 when a movement happens, and '' (null) when it fails.
Numbered Steps to Reproduce Problem: Try grabbing the value returned by step(mob,dir) and output it.
Code Snippet (if applicable) to Reproduce Problem:
movement()
if(checkStun())
return 0
if(mob.Dashing)
. = step(mob,LastDir)
else if(!Dir) . = step(mob,LastDir)
else
. = step(mob,Dir)
LastDir=Dir
if(. && !(Loop.TimeOut))Loop.TimeOut = initial(Loop.TimeOut)
Expected Results: movement() to return 1 on movement.
Actual Results: movement() returning 0 on movement, '' or null otherwise.
Does the problem occur:
Every time? Or how often? Everytime
In other games? Not verified.
In other user accounts? Totally sure.
On other computers? Totally sure.
When does the problem NOT occur? Never because it never returned 1 once.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I am not sure of this one.
Workarounds: To check if . is null; '. = !(isnull(.))' after termination of the procedure.
movement()
if(checkStun())
return 0
if(mob.Dashing)
. = step(mob,LastDir)
else if(!Dir) . = step(mob,LastDir)
else
. = step(mob,Dir)
LastDir=Dir
. = !(isnull(.)) // Workaround
if(. && !(Loop.TimeOut))Loop.TimeOut = initial(Loop.TimeOut)