You are right Kira Vacaan but actually when we shoot, the bullet doesn`t hit immediately,unless we a so close to it, as it takes some milliseconds of second to reach the end of its power.When we do it by the method of intersect object,Sometimes, hit several objects at the same time and we have to write conditions to avoid to kill more than one enemy at a time.
About speed of the bullet, ha ha...you check this handicap...that is truth..., just to give a chance to the enemies to scape.
I use differents methods .As z_man pointed out we can use the camera position and move it hundreds of units ahead to get all coordinates x,y,z new_x,new_y,new_z and finally use an intersect object to use as the bulles.
Here is another example.
autocam off:hide mouse
sync on
make light 1:position light 1,0,150,0
make object box 3,2,2,2:color object 3,rgb(0,0,0)
make object box 100,400,1,400:color object 100,rgb(100,70,30) //suelo
`-----------------------------------------------------------
make object box 101,30,30,30:position object 101,100,30,200
make object box 102,30,30,30: position object 102,60,30,-190
make object box 103,30,30,30:position object 103,0,30,-190
make object box 104,30,30,30: position object 104,-60,30,-190
do
if upkey()=1 then x#=newxvalue(x#,a#,1) : z#=newzvalue(z#,a#,1)
if downkey()=1 then x#=newxvalue(x#,a#,-1) : z#=newzvalue(z#,a#,-1)
ink rgb(255,0,0),1:set cursor 319,235:print "+" // foresight
//starting camera position
x=camera position x()
y=camera position y()
z=camera position z()
if mouseclick()
move camera 1000
//end camera position
nx=camera position x()
ny=camera position y()
nz=camera position z()
endif
// we check the distance to the reached object
for i= 100 to 104
if intersect object(i,x,y,z,nx,ny,nz)>0
distancia#=intersect object(i,x,y,z,nx,ny,nz)
endif
next i
set cursor 5,5
print "DISTANCE OF HIT: ", distancia#,"m"
// camera controls
rotate camera cam#,a#,0
position camera x#,55,z#
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
if cam#<=290 and cam#>180 then cam#=290
if cam#>=70 and cam#<180 then cam#=70
//we check which object is being hit
if mouseclick()
for i= 100 to 104
if intersect object(i,x,y,z,nx,ny,nz)>0
position object 3,x#,55,z#
rotate object 3,cam#,a#,0
move object 3,distancia#
endif
next i
endif
if mouseclick()
for i= 101 to 104
if intersect object(i,x,y,z,nx,ny,nz)>0
color object i,rgb(0,0,255): position object i,object position x(i),30+rnd(2),object position z(i)
SET CURSOR 200,215:PRINT "LE HAZ DADO AL CUBO ",I-(100)
else color object i,rgb(255,255,255)
endif
next i
endif
sync
loop
oh my god