Im aiming for the cross hair to have the limb attatched to it then use the intersect object command for firing mouse click,heres the code.
"perform checklist for object limbs 1
`limb_count = GET LIMB COUNT(1)
`print limb_count
`MAKE OBJECT SPHERE 9999,2
`MAKE MESH FROM OBJECT 1,9999
`DELETE OBJECT 9999
`ADD LIMB 1,32,1
`OFFSET LIMB 1,32,0,-50,5
`DELETE MESH 1
do
rem xxxxxxxxxxxxxxxxxx control player1 xxxxxxxxxxxxxxxxxxxxxxxxxx
rem running
`if shiftkey() = 1 and upkey() = 1
`position object 1, x#, 0, z#
`loop object 1,264,286
`x# = newxvalue( x#, object angle y(1), -0.21 )
`z# = newzvalue( z#, object angle y(1), -0.21 )
`position camera x#, cy + 15, z# -50
`endif
rem waiting
`print limb_count
if upkey() = 0
position camera x#, cy + 15, z# -50
point camera x#, cy, z#
position object 1, x#, 0, z#
loop object 1,23,283
endif
rem walk forwards
if upkey() = 1 and shiftkey() = 0
position object 1, x#, 0, z#
loop object 1,1,22
x# = newxvalue( x#, object angle y(1), -0.13 )
z# = newzvalue( z#, object angle y(1), -0.13 )
position camera x#, cy + 15, z# -50
point camera x#, cy, z#
endif
rem switch view
if spacekey() = 1
position camera x#, 8, z#
yrotate camera ay#
`cls
rem get mouse x y
mx=mousex()
my=mousey()
rem draw line from x y
line mx-10 ,my ,mx+10 ,my
line mx ,my-10 ,mx ,my+10
rem add sights maybe gosub spacekey
endif
Rem Left and Right
If Leftkey()=1 then aY# = Wrapvalue(aY#-5)
If Rightkey()=1 then aY# = Wrapvalue(aY#+5)
rem rotate the Player1
Yrotate object 1,aY# + 180
`yrotate camera ay#"
Also,are there any other tutorials on firing and aiming with the mouse not neccessarily using limbs?