Login

Simple scipting

Kohaku's picture
//standard setup code
sync on
sync rate 30
 
 
//prepare the code holding array
dim code$(10)
 
 
//stick our code in an array
code$(1) = "print"
code$(2) = "hello!"
 
code$(3) = "print"
code$(4) = "Lets wait for 3 seconds..."
 
code$(5) = "wait"
code$(6) = "3000"
 
code$(7) = "print"
code$(8) = "well that was fun! :D"
 
code$(9) = "wait"
code$(10) = "3000"
 
 
//main loop
for a = 1 to 10
	select code$(a)
		case "print"
			inc a
			print code$(a)
		endcase
		case "wait"
			inc a
			wait val(code$(a))
		endcase
		case "end"
			exit
		endcase
	endselect
sync
next a
 
 
//bye!
end
Average: 5 (1 vote)

Comments

What would you use this for?
Merlin's picture

What would you use this for? Its a nice little app, just seems a weird way of doing it Smiling

This was just an example for
Kohaku's picture

This was just an example for someone who was wondering about scripting.

You could add loads to it though.