here it is ... thanks for checking this out:
phy start
autocam off
randomize timer()
set image colorkey 0, 0, 0
set normalization on
set display mode 1024, 768, 32
set camera range 1,20000
light#=90
set ambient light light#
red#=145
green#=220
blue#=255
color backdrop rgb(red#,green#,blue#)
_setupcamera:
position camera 0,100,0
point camera 100,0,100
set camera range 1,5000
_setuplandmass:
load object "media\landscape\whi.x", 1
rotate object 1,-90,0,0
phy make rigid body static terrain 1
_stickman:
load object "media\player\stickman.x",2
position object 2,0,100,0
yrotate object 2,180
fix object pivot 2
x#=object position x(2)
y#=object position y(2)
z#=object position z(2)
phy make capsule character controller 2, x#, y#, z#, 30, 30, 1, 5, 75
scale object 2,25,25,25
_setuphouse:
load object "media\structures\hut1.x",3
position object 3,0,0,500
phy make rigid body static mesh 3
DO
x#=object position x(2)
y#=object position y(2)
z#=object position z(2)
keypress#=scancode()
set camera to follow x#,y#,z#,object angle y(2),30,18,35,1
text 0,0,"Fps: "+str$(screen fps())
text 0,20,"Polys: "+str$(statistic(1))
set cursor 0,40
print "Scancode: ",scancode()
set cursor 0,60
print "X: ",x#," Y: ",y#," Z: ",z#
if leftkey ( )
turn object left 2, 3
endif
if rightkey ( )
turn object right 2, 3
endif
if upkey ( )
phy move character controller 2, 50
else
phy move character controller 2, 0
endif
if downkey ( )
phy move character controller 2, -50
else
phy move character controller 2,0
endif
if escapekey ( )
end
endif
phy update
LOOP