sync on
sync rate 60
load object "U.x", 1
load object "G.x",2
position object 2,-1,-1,0
set object collision on 1
set object collision on 2
do
rem refresh screen
sync
rem store old positions
oldx# = object position x(1)
oldy# = object position y(1)
oldz# = object position z(1)
rem movement
If Leftkey() then Turn object left 1,1
If Rightkey() then Turn object right 1,1
If Upkey() then x#=newxvalue(x#,object angle y(1),1):z#=newzvalue(z#,object angle y(1),1)
If Downkey() then x#=newxvalue(x#,object angle y(1),-1):z#=newzvalue(z#,object angle y(1),-1)
rem reposition object
position object 1,x#,y#,z#
rem collision
if object collision(1,0)>0
x#=oldx#
y#=oldy#
z#=oldz#
endif
position object 1,x#,y#,z#
loop
If you know please help! I suck.....
But, Soon My friends and I will get to program together, but they are out o town, so I need help.
Programmers United-Programming for programmers