Thanks, but I just got it to work myself.
I have no idea what I did, but this code is working:
sync on
sync rate 60
autocam off
REM load, position and set settings for gun
camx#=camera position x()
camy#=camera position y()
camz#=camera position z()
load object "colt.x",27
rotate object 27,0,0,0
scale object 27, 10,10,10
position object 27,camx#+1,camy#-1,camz#+2
lock object on 27
set object cull 27,0
REM make the matrix
make matrix 1,1000,1000,100,100
position matrix 1,-100,-3,-100
REM make spheres
for x=2 to 26
make object sphere x,5
position object x,rnd(300),0,rnd(300)
next x
REM as this is a first person game, we use the camera as the player.
REM position the camera
position camera 0,0,0
point camera 0,0,0
REM bullet settings
do
set cursor 0,15
print "Camera position x : "; int(camera position x())
set cursor 0,25
print "Camera position z : "; int(camera position z())
set cursor 0,0
print "Frames Per Second : ";screen fps()
if keystate(17)=1 then move camera 1
if keystate(31)=1 then move camera -1
if keystate(30)=1 then turn camera left 2
if keystate(32)=1 then turn camera right 2
disable object zdepth 27
sync
loop
Thanks
[EDIT] But I have another problem now though...
I am trying to make a bullet that will fire if mouseclick=1.
It looks like:
if mouseclick()=1
position object bulletnumber#,bulletposx#,bulletposy#,bulletposz#
rotate object bulletnumber#, 0-camera angle x(),0-camera angle y(),0-camera angle z()
fire#=1
bulletlife#=100
show object bulletnumber#
endif
and so on...
It actually works great... But if I move the camera, it´s like the program doesn´t update the camera position, and positions the bullet in the cameras original position...
[EDIT EDIT
] I solved the problem myself.... sorry
I told the program that bulletposx/y/z=camera position x/y/z OUTSIDE the loop, so it WASN`T updating tho coordinates....