Rem ***** Main Source File *****
make directory "models"
set dir "models"
start:
sync off
backdrop off
cls
ink RGB(128,128,128),RGB(0,0,0)
dir
input "models name :",name$
load object name$,1
sync on : sync rate 0
backdrop on
position object 1,0,0,0
position camera 0,0,-20
point camera 0,0,0
do
controlmodel()
printout()
controlcamera()
if spacekey() = 1
delete object 1
cls
goto start
endif
sync
loop
function controlmodel()
if rightkey() = 1
turn object right 1,1
endif
if leftkey() = 1
turn object left 1,1
endif
if upkey() = 1
pitch object up 1,1
endif
if downkey()
pitch object down 1,1
endif
if scancode() = 25
play object 1
endif
if scancode() = 2
set object frame 1,0
endif
endfunction
function printout()
set cursor 0,0
ink RGB(255,0,0),RGB(0,0,0)
print "Animation frame set to : ",object frame(1)
print "Total frames of animation : ",total object frames(1)
print "Arrow keys rotates model"
print "P to play animation 1 to reset animation to frame 0"
print "W,S,A,D = camera in,out,left,right : Shift/Controlkey = up,down"
print "R key to reset camera position / Spacekey to select new model"
endfunction
function controlcamera()
if scancode() = 17 and keystate(17) = 1
move camera 0,.5
endif
if scancode() = 31 and keystate(31) = 1
move camera 0,-.5
endif
if scancode() = 30 and keystate(30) = 1
turn camera left 90
move camera 0,.5
turn camera right 90
endif
if scancode() = 32 and keystate(32) = 1
turn camera right 90
move camera 0,.5
turn camera left 90
endif
if shiftkey()
pitch camera up 90
move camera 0,.1
pitch camera down 90
endif
if controlkey()
pitch camera down 90
move camera 0,.1
pitch camera up 90
endif
if scancode() = 21
position camera 0,0,0,-20
endif
endfunction
Here is a really simple code for pro to view your model, lets you control camera, rotate the model, play/reset the animation to 0 nothing fancy.
As for settings i use ts 6.6 with gamepack 1.6 and use these .x export settings (ascii text checked
/ Geometry = Export gemometry
/ Material = Export textures - Inline Material - Convert texture to bmp - res oringinal size - normals from material editor
/ Animation = Export animation - Loop animation - Use orignal keyframes - Keyframe step 5 - Rescale factor 1 - position quality spline - coordinate system left handed - float size 64)
and animations export fine for me.
Your signature has been erased by a mod -- please resize to under 600x120...