Quote: "If you want to stop an object looping when the upkey is not pressed
If UpKey()=0 then STOP OBJECT Object Number."
no I don't want this
I know it,
testing my code
autocam off
hide mouse
sync on
sync rate 80
load object "level.x",1
load object "mouse.x",3:loop object 3,1,100
make object SPHERE 2,-1
position object 2,-77,13,77
hide object 2
scale object 3,15,15,15
load object "cheese.x",4
position object 4,10,13,77
scale object 4,20,20,20
load object "cheese.x",5
position object 5,77,13,70
scale object 5,20,20,20
load object "cheese.x",6
position object 6,77,13,-75
scale object 6,20,20,20
load object "cheese.x",7
position object 7,-88,13,-75
scale object 7,20,20,20
SET OBJECT COLLISION TO SPHERES 2
SET OBJECT COLLISION TO POLYGONS 1
do
if leftkey() = 1
rotation# = rotation# - 1
yrotate object 2, rotation#
endif
if rightkey() = 1
rotation# = rotation# + 1
yrotate object 2, rotation#
endif
if upkey()=1
if object collision(1,2)=0 then move object 2,1:loop object 3,200,260
if object collision(1,2)=1 then move object 2,-1:loop object 3,200,260
endif
turn object right 4,0.9
turn object right 5,0.9
turn object right 6,0.9
turn object right 7,0.9
if downkey()=1
if object collision(1,2)=0 then move object 2,-1:loop object 3,200,260
if object collision(1,2)=1 then move object 2,1:loop object 3,200,260
endif
if mouseclick()=1
loop object 3,1,100
endif
if object collision(2,4) then hide object 4
if object collision(2,5) then hide object 5
if object collision(2,6) then hide object 6
if object collision(2,7) then hide object 7
me_x#=object position x(2)
me_y#=object position y(2)
me_z#=object position z(2)
position object 3,me_x#,me_y#-10,me_z#
rotate object 3,0,object angle y(2),0
set camera to follow me_x#,me_y#,me_z#,object angle y(2) ,40,10,10,1
center text screen width()/2,screen height()-50,"Welcome To Gero's Tutorials^^ G-E-R-O@hotmail.com"
sync
loop
look the player in start game the mouse(player) look lift and right and if press upkey "go up" or move object to up,
and animation Keyframe in "3D Studio Max" animation object move (animation arm and foot) from DBPro loop object and don't stoping
(example this code)
if mouseclick()=1
loop object 3,1,100
endif
are U anderstand now?
I like eating the pizza and drinking coffee some time^^
I want to learn DBPro