You can create a queue that holds all the commands you want the object to do until the timer is up. I generally don't work with 3D stuff so I made a program using a sprite. When you press any arrow key it'll store numbers that represent up, down, left, and right. When 10 seconds are up it'll go through the whole queue and extract each of those numbers to move the sprite in the order they were added to the queue.
Just for fun I added rotating of the sprite too so press z to rotate left and x to rotate right. I'll let you do the 3D conversion.
sync rate 0
sync on
` Make a box
ink rgb(0,255,0),0
box 0,0,50,50
ink rgb(255,0,0),0
box 0,0,25,50
get image 1,0,0,50,50,1
` Create timers
tim=timer()
QueueTim=timer()
` Set the sprites starting coordinates
x=screen width()/2
y=screen height()/2
` Create the sprite and offset it to it's center
sprite 1,x,y,1
offset sprite 1,image width(1)/2,image height(1)/2
ink rgb(255,255,255),0
do
` Show the queue
text 0,0,"Current Queue = "+Queue$
` Check if the timer will allow a keypress (100 milliseconds)
if timer()>tim+100
` Check up arrow
if keystate(200)
` Add up arrow to queue
Queue$=Queue$+"1"
endif
` Check down arrow
if keystate(208)
` Add down arrow to queue
Queue$=Queue$+"2"
endif
` Check left arrow
if keystate(203)
` Add left arrow to queue
Queue$=Queue$+"3"
endif
` Check right arrow
if keystate(205)
` Add down arrow to queue
Queue$=Queue$+"4"
endif
` Check for z key (rotate left)
if keystate(44)
` Add rotate left to queue
Queue$=Queue$+"5"
endif
` Check for x key (rotate right)
if keystate(45)
` Add rotate right to queue
Queue$=Queue$+"6"
endif
` Reset timer
tim=timer()
endif
` Check if it's time to activate the queue (10 seconds)
if timer()>QueueTim+10000
` Go through the Queue
for t=1 to len(Queue$)
` Extract the movement number from the Queue
a=val(mid$(Queue$,t))
if a=1 then dec y,10 ` Move Up
if a=2 then inc y,10 ` Move Down
if a=3 then dec x,10 ` Move Left
if a=4 then inc x,10 ` Move Right
if a=5 then rotate sprite 1,sprite angle(1)-5 ` Rotate Left
if a=6 then rotate sprite 1,sprite angle(1)+5 ` Rotate Right
` Show the queue
text 0,0,"Current Queue = "+Queue$
` Show that the queue is taking effect
text 0,20,"Running Queue..."
` Show the move
text 0,40,"Current Move = "+str$(a)
` Replace the current move with - (to show where it's at)
Queue$=left$(Queue$,t-1)+"-"+right$(Queue$,len(Queue$)-t)
` Show the sprite
sprite 1,x,y,1
sync
` Wait 100 milliseconds (so you can see the movement)
wait 100
next t
` Reset the Queue
Queue$=""
` Reset queue timer
QueueTim=timer()
endif
sync
loop