ON TIMER 10
mytimer = mytimer + 1
IF mytimer > 3 THEN mytimer = 1
SELECT CASE myTimer
CASE 1
ai = RANDOM 1 2 3 4
IF ai = 1 THEN x = x + 20
IF ai = 2 THEN x = x - 20
IF ai = 3 THEN y = y + 20
IF ai = 4 THEN y = y - 20
SPRITE 1 x y block2.gif
This is a script I wrote a long time ago for a sprite that ran around randomly. It worked in a different game, but when I copied it into a new one, it gave me an error message "Nested SELECT CASE not allowed" I'm sure there's a simple solution, but I have never used the SELECT CASE command before, and I'm still a noob at GM.