EDIT 3: solved all of it so far
Rem ***** Main Source File *****
rem basic things
phy start:sync on:sync rate 60:autocam off:backdrop on:color backdrop RGB(150,255,00):phy set gravity 0,-80,0
position camera 0,5,-20
rem player
make object sphere 1,20
position object 1,0,40,0
phy make rigid body dynamic sphere 1
rem other objects (static)
make object box 2,200,20,200
make object cube 3,20
position object 2,0,-20,0
position object 3,0,0,50
for c=2 to 3
phy make rigid body static box c
next c
rem camera
`make camera 1
do
phy add rigid body force 1,0,-5,0,2
x=object position x(1)
y=object position y(1)
z=object position z(1)
angx=object angle x(1)
angy=object angle y(1)
angz=object angle z(1)
position camera 0,object position x(1),object position y(1)+200,object position z(1)
point camera 0,object position x(1),0,object position z(1)
if upkey()=1 then phy add rigid body force 1,0,0,5,2
if downkey()=1 then phy add rigid body force 1,0,0,-5,2
if leftkey()=1 then phy add rigid body force 1,-5,0,0,2
if rightkey()=1 then phy add rigid body force 1,5,0,0,2
if spacekey()=1 then phy add rigid body force 1,0,5,0,2
phy update
sync
loop
EDIT4: For future refference I tried adding jumping, can you explain why this doesn't work?
Rem ***** Main Source File *****
rem basic things
phy start:sync on:sync rate 60:autocam off:backdrop on:color backdrop RGB(150,255,00):phy set gravity 0,-80,0
position camera 0,5,-20
rem player
make object sphere 1,20
position object 1,0,40,0
phy make rigid body dynamic sphere 1
rem other objects (static)
make object box 2,200,20,200
make object cube 3,20
position object 2,0,-20,0
position object 3,0,0,50
for c=2 to 3
phy make rigid body static box c
next c
jump# as float
jumping# as float
do
phy add rigid body force 1,0,-5,0,2
if jumping#=1 then phy add rigid body force 1,0,-25,0,2 and jump#=1
if jumping#=1 then phy add rigid body force 1,0,-25,0,2 and jumping#=0
x=object position x(1)
y=object position y(1)
z=object position z(1)
angx=object angle x(1)
angy=object angle y(1)
angz=object angle z(1)
position camera 0,object position x(1),object position y(1)+200,object position z(1)
point camera 0,object position x(1),0,object position z(1)
if upkey()=1 then phy add rigid body force 1,0,0,5,2
if downkey()=1 then phy add rigid body force 1,0,0,-5,2
if leftkey()=1 then phy add rigid body force 1,-5,0,0,2
if rightkey()=1 then phy add rigid body force 1,5,0,0,2
if spacekey()=1 and jump#=1
jumping#=1
jump#=0
phy add rigid body force 1,0,-15,0,2
endif
phy update
sync
loop
Also how would I go about a first person (i know how to do that) but when I press left and right it turns to sphere and the camera, and then when I press forward it goes that way (using forces or something with a dynamic object)
I want coke, not Pepsi!