Actor picks random directions to move

So I have an actor that I want to randomly path around. I'd like it to pick one of 4 directions (0, 90, 180, 270) to move, move for a random amount of time (say 1-3 seconds), then stop for a random amount of time, and finally picking a new direction continuing the cycle.

I've started by creating new integers for the actor, e.q. MoveUp = 90. How can I randomly pick one of these 4 integers as the direction and have the actor move? Or is there a way to set these numbers without making the actor integers?

If I can get the movement right I'll see about changing the image per direction. :)

Comments

Sign In or Register to comment.