Just figured you can do something like this in Lua !
function still()
print("still")
end
function move()
print("move")
end
stuck=true
(stuck and still or move)() |
So still will be executed if stuck is true, otherwise move will be executed. No idea if it's faster then if this then that else the other, but it may be.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com