I'm trying to create some 'bot' players in my game (controlled server-side) that act at 'random' times.
My concept was to fire a clock.setTimeout() with a random time, that calls the 'botActions' function, and at the end of that function calls itself again using another setTimeout with a different 'random' time.
Scope issue, I assume...? Is there a more 'proper' way to accomplish this?