Posted: 14th Jan 2004 12:57
here it is:

+ Code Snippet
dim posx#(1000)
dim posz#(1000)
dim yrot#(1000)

do
text 40,40,"replay demo by jopie dopie."
text 40,60,"use the arrow keys to move the object, press space to see"
text 40,80,"your replay or wait till the movieframe is 1000"
text 100,100,"press space"
if spacekey()=1 then exit
loop
sleep 1000
sync on
sync rate 0
make object cube 1,100
autocam off
position object 1,0,0,0
position camera 0,200,200
point camera 0,0,0
do
sync
frame=frame+1
if frame=999 then goto replay
if spacekey()=1 then goto replay
posx#(frame)=object position x(1)
posz#(frame)=object position z(1)
yrot#(frame)=object angle y(1)

if upkey()=1 then move object 1,1
if downkey()=1 then move object 1,-1
if leftkey()=1 then yr#=wrapvalue(yr#-3)
if rightkey()=1 then yr#=wrapvalue(yr#+3)
yrotate object 1,yr#
 set cursor 0,0
 print "FPS: ";screen fps()
 print "movie frame: ";frame
loop
replay:
do
sync
cls
set camera view 0,0,1,1
center text 320,240,"OK the movement is recorded now, press space to see"
sleep 500
if spacekey()=1 then exit
loop


cls
set camera view 0,0,640,440
text 30,460,"REPLAY *"
maxframes=frame

for movieframe = 1 to maxframes 
set cursor 0,0
 print "FPS: ";screen fps()
 print "movie frame: ";movieframe
 position object 1,posx#(movieframe),0,posz#(movieframe)
 yrotate object 1,yrot#(movieframe)
 sync
next movieframe


cheers
Posted: 16th Jan 2004 17:04
no comments??
Posted: 17th Jan 2004 5:01
It's kind of cool.With that code people make raplays for car ,baketball or football games.
Posted: 17th Jan 2004 5:17
If you make a 2Dimensional Array then yes.
Posted: 19th Jan 2004 6:13
Well done. Replay's are something I've never tried to do, and this will give me a nice barebone idea of how to do it.

kudos Joopie Doopie

Posted: 20th Jan 2004 20:03