OK, I got most of it to work, except the visible sphere doesn't rotate with the invisible one
Sync on
Sync rate 30
hide mouse
backdrop on
fog on
set camera range 1,6000
fog distance 1200
fog color RGB(rnd(255),rnd(255),rnd(255))
color backdrop RGB(128,128,128)
`make player
make object sphere 200,50
set object collision to spheres 200
position object 200,rnd(10000),0,rnd(10000)
HIDE OBJECT 200
`make visible sphere
make object sphere 207,50
set object collision to spheres 207
position object 207,rnd(10000),0,rnd(10000)
load image "texture.bmp",5
texture object 200,5
`make obstacles
For x = 1 to 100
make object cube x,100
position object x,rnd(10000),0,rnd(10000)
Next x
`make goal
make object cube 201,25
position object 201,rnd(10000),0,rnd(10000)
set object collision to boxes 201
`make matrix
make matrix 1,10000,10000,20,20
`main loop
Do
`print stuff
set cursor 0,0
Print "Get the cool cube"
set cursor 0,10
Print "Score: ",Score
`store variables
aY# = object angle Y(200)
aZ# = object angle Z(207)
aY2# = object angle Y(207)
`controls
If upkey()=1 then move object 200,20
if upkey()=1 then zrotate object 207,wrapvalue(aZ#+7)
if leftkey()=1 then yrotate object 200,wrapvalue(aY#-5)
if rightkey()=1 then yrotate object 200,wrapvalue(aY#+5)
if downkey()=1 then move object 200,-10
if downkey()=1 then zrotate object 207,wrapvalue(aZ#-7)
`get player positions
X# = object position x(200)
Z# = object position z(200)
Y# = object position y(200)
position object 207,X#,Y#,Z#
`get camera values
cZ# = newzvalue(Z#,aY#-180,100)
cX# = newxvalue(X#,aY#-180,100)
`position camera
position camera cX#,100,CZ#
point camera X#,50,Z#
`collision data
if object collision(201,200)>0
inc score
position object 201,rnd(10000),0,rnd(10000)
endif
Sync
Loop
Hi I just bought FPS Creator! Want to help me out?