riiiite... Well why didn;t you say so?!
sync on
hide mouse
randomize timer()
backdrop on
color backdrop 0
autocam off
`this command makes it draw the background
`behind the 3d stuff
draw sprites first
`load the background and make it a sprite
load image "backdrop.bmp",1,1
sprite 1,0,0,1
set sprite 1,0,0
hide sprite 1
sprite 1,0,0,1
size sprite 1,screen width(), screen height()
load object "cell.x",1
position object 1, 0, 10, 0
position camera object position x(1),20,object position z(1)
point camera object position x(1),10,object position z(1)
i=1
timebegin# = timer()
rem 0 = normal
rem 1 = display thingy
STATUS = 0
do
`if spacekey is pressed turn off backdrop and show background
if spacekey()=1
backdrop off
show sprite 1
`if spacekey is not pressed turn on backdrop and hide background
else
backdrop on
hide sprite 1
endif
if ia=0
ia=1
iz=0
i=i+1
clone object i,1
position object i,object position x(i-1),object position y(i-1),object position z(i-1)
yrotate object i,rnd(360)
endif
if ia=1
iz=iz+1
move object i,0.1
`change 10 to how big your object is /10
if iz=10 then ia=0
endif
`*****************************************************
`* I modified this to not retrun and re calculate *
`* a new direction if if goes out of the screen area *
`*****************************************************
if object screen x(i) > screen width()-80 or object screen x(i) < 80 then move object i, -.1
if object screen y(i) < 80 or object screen y(i) > screen height()-80 then move object i, -.1
time = (timer() - timebegin#)/1000
set cursor 5, screen height()-60
print time
if time >= 100 then gosub LOAD_NEW_IMAGE : STATUS = 1
if STATUS = 1 and time >= 200
hide sprite 2
STATUS = 0
timerbegin# = timer()
endif
sync
loop
end : rem this is important to stop it overrunning into the loading new image when the loop ends.
LOAD_NEW_IMAGE:
l = rnd(3) + 1 : ' This picks a number in the rand 0-3, then adds 1 to make it 1 to 4.
select l
case 1
load image "human.png", 2
endcase
case 2
load image "frog.png", 2
endcase
case 3
load image "squirrel.png", 2
endcase
case 4
load image "snake.png", 2
endcase
endselect
sprite 2, 0, 0, 2
size sprite 2, screen width(), screen height()
show sprite 2
return
hows that - it was done off the top of my head..
Basically, you have a status flag. When you select your image, you then make a sprite out of it and scale it to full screen.
In the main loop when STATUS = 1 then it will show the sprite over the stuff. Then when timer >=200 it will hide it and reset the timers.. Hows that?