Like this:
Rem Project: Menu
Rem Created: Tuesday, August 25, 2009
Rem ***** Main Source File *****
sync on
sync rate 60
For M = 1 to 3
MakeRandomTexture(M, 5, 5)
Next M
for M=1 to 3
`Make object
make object cube M,5
Position object M,object position x(M),M*5-5,Object position Z(M)
Texture Object M, M
next M
do
control camera using arrowkeys 0,1,1
sync
loop
Function MakeRandomTexture(M, XW, YW)
For X = 1 to XW
For Y = 1 To YW
Dot X, Y, RGB(RND(255), RND(255), RND(255))
Next Y
Next X
Get Image M, 1, 1, XW, YW
EndFunction
Or this, with an array:
Rem Project: Menu
Rem Created: Tuesday, August 25, 2009
Rem ***** Main Source File *****
sync on
sync rate 60
Dim Images(3)
For X = 1 to 3
Y = FindFreeImage(1, 1000)
MakeRandomTexture(Y, 10, 10)
Images(X) = Y
Next X
for M=1 to 3
`Make object
make object cube M,5
Position object M,object position x(M),M*5-5,Object position Z(M)
Texture Object M, Images(M)
next M
do
control camera using arrowkeys 0,1,1
sync
loop
Function FindFreeImage(SR, ER)
For X = SR to ER
If Image Exist(X) = 0 Then ExitFunction X
Next X
EndFunction 0
Function MakeRandomTexture(M, XW, YW)
For X = 1 to XW
For Y = 1 To YW
Dot X, Y, RGB(RND(255), RND(255), RND(255))
Next Y
Next X
Get Image M, 1, 1, XW, YW
EndFunction