hi...
i made that cause...............i was not knowing what to do ^^
pretty fun
move with arrow key.....
and the controle are....with the camera i mean ..like in mario 64...it depend of the camera.....
there is some useless code.....in it cause it made from my .....mirror demo....sorry..i made that in 2 hours....then
sync on
sync rate 0
hide mouse
backdrop on : color backdrop rgb(150,100,0)
create bitmap 1,1024,1024
ink rgb(100,0,0),0
box 0,0,512,512
ink rgb(0,100,0),0
box 512,0,1023,512
ink rgb(0,0,100),0
box 0,512,512,1023
ink rgb(0,0,0),0
box 512,512,1023,1023
get image 1,0,0,1024,1024
delete bitmap 1
make matrix 1,5000,5000,20,20
prepare matrix texture 1,1,1,1
fill matrix 1,0,0
rem ------------------------------------------------
rem corps
make object box 1,100,200,100
rem bras
make object box 2,30,100,30
make mesh from object 1,2
delete object 2
rem jambe
make object box 2,30,100,30
make mesh from object 2,2
delete object 2
rem point de rotation
make object plain 2,1,1
make mesh from object 3,2
delete object 2
rem faire un object pour le corps....pour collision
make mesh from object 4,1
make object 2,4,0
delete mesh 4
rem adder les bras/jambe au perso
make object 10,2,0
for i=1 to 4
add limb 1,i,1
next i
rem adder les jambes au perso
for i=1 to 4
add limb 1,i+4,2
next i
rem adder les point de rotation au perso
for i=9 to 16
add limb 1,i,3
next i
rem fixer les bras/jambe aux point de rotation
for i=1 to 8
link limb 1,i,i+8
next i
rem fixer les point de rotation aux.....membre ki les font bouger..
for i=1 to 4
link limb 1,8+(2*i),(i*2)-1
next i
rem offsetter les bras/jambe de leur point de rotation
for i=1 to 8
offset limb 1,i,0,-50,0
next i
rem offset les bras/jambe ...du bas ..par rapport..a leur bras/jambe du haut
for i=1 to 4
offset limb 1,8+(i*2),0,-50,0
next i
rem POSITIONNEMENT FINAL: mettre les bras/jambe a la bonne place (en positionnant seulemnt leur point de rotation)
offset limb 1,9,-60,100,0
offset limb 1,11,60,100,0
offset limb 1,13,-40,-100,0
offset limb 1,15,40,-100,0
rem Tete
make mesh from object 4,10
add limb 1,17,4
offset limb 1,17,0,125,0
set object rotation ZYX 1
clear all object keyframes 1
i=1:rotate limb 1,8+((i*3)-(3-i)),45,90,0:rotate limb 1,10+((i*3)-(3-i)),45,270,0:set object keyframe 1,0
rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,10
rotate limb 1,13,0,0,0:rotate limb 1,14,0,0,0:rotate limb 1,15,45,0,0:rotate limb 1,16,315,0,0:rotate limb 1,9,45,90,0:rotate limb 1,11,315,135,0:set object keyframe 1,20
rotate limb 1,15,0,0,0:rotate limb 1,16,0,0,0:rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,30
rem -------------------------------------------
delete object 10
delete object 2
x#=2500
z#=3500
y#=0
ink rgb(255,255,255),0
Direction=0
make object plain 100,1,1
for i=1 to 4
read facex
read facey
read facez
make object plain 100+i,300,300
glue object to limb 100+i,100,0
position object 100+i,facex,facey,facez
point object 100+i,0,0,0
next i
rotate object 101,0,90,180
rotate object 102,0,270,180
xrotate object 103,180
xrotate object 104,180
rem make object cube 100,200
position object 100,2500,150,4500
xrotate object 100,180
position object 1,x#,y#+90,z#
position camera x#,y#+150,z#
rotate camera 25,ay#,0
move camera -250
scale object 1,30,30,30
yrotate object 1,180
fix object pivot 1
UpdateMirroir=0
do
UpdateMirroir=UpdateMirroir+1
NbTouche=LeftKey()+RightKey()+Upkey()+Downkey()
if (upkey()) and (NbTouche=1) then Direction=1
if (downkey()) and (NbTouche=1) then Direction=5
if (leftkey()) and (NbTouche=1) then Direction=7
if (rightkey()) and (NbTouche=1) then Direction=3
if (upkey()) and (leftkey()) (NbTouche=2) then Direction=8
if (upkey()) and (rightkey()) (NbTouche=2) then Direction=2
if (downkey()) and (rightkey()) (NbTouche=2) then Direction=4
if (downkey()) and (leftkey()) (NbTouche=2) then Direction=6
Difx#=camera position x()-x#
Difz#=camera position z()-z#
CamAng#=atanfull(Difx#,Difz#)
Camx#=newxvalue(x#,CamAng#,500)
Camz#=newzvalue(z#,CamAng#,500)
if direction<>0
if object looping(1)=0 then loop object 1,10,30
ay#=wrapvalue(((Direction-1)*45)+(CamAng#-180))
x#=newxvalue(x#,ay#,10)
z#=newzvalue(z#,ay#,10)
direction=0
else
stop object 1
endif
yrotate object 1,ay#
position object 1,x#,y#+90,z#
if sqrt((camera position x()-x#)^2+(camera position z()-z#)^2)>500 then Position Camera CamX#,camera position y(),CamZ#
point camera x#,y#+150,z#
oldcamx#=camera position x()
oldcamy#=camera position y()
oldcamz#=camera position z()
oldcamay#=camera angle y()
oldcamax#=camera angle x()
oldcamaz#=camera angle z()
if UpdateMirroir=2
for i=0 to 4
hide object 100+i
next i
position camera 2500,150,4500
restore camera
for i=0 to 3
rotate camera 0,wrapvalue(i*90),0
move camera -100
get image 100+i,64*(i*2),0,(64*(i*2))+64*2,48*2
read objno
texture object objno,100+i
paste image 200+i,64*(2*i),0
set camera view 64*(i*2),0,(64*(i*2))+64*2,48*2
next i
UpdateMirroir=0
for i=0 to 4
show object 100+i
next i
endif
set cursor 0,0
print Screen Fps()
position camera oldcamx#,oldcamy#,oldcamz#
rotate camera oldcamax#,oldcamay#,oldcamaz#
position camera 2500,150,4500
point camera x#,y#,z#
if sqrt((2500-x#)^2+(4500-z#)^2)<330
x#=newxvalue(2500,oldcamay#,331)
z#=newzvalue(4500,oldcamay#,331)
endif
if UpdateMirroir=1
get image 200,0,0,64*2,48*2
get image 201,64*2,0,64*4,48*2
get image 202,64*4,0,64*6,48*2
get image 203,64*6,0,64*8,48*2
endif
set camera view 0,0,640,480
sync
loop
data 150,0,0,-150,0,0,0,0,150,0,0,-150,0,150,0,0,-150,0
camera:
data 104,101,103,102