Here is my shooting and collision code
`shooting
If spacekey() = 1 and time# > 50
delete object 13
bulletno = 1
Make object sphere 12,0
move object 1,0.1
position object 12, object position x(1), object position y(1), object position z(1)
move object 1,-0.1
make object sphere 13,5
color object 13,rgb(255,0,255)
position object 13, object position x(1), object position y(1), object position z(1)
point object 13, object position x(12), object position y(12), object position z(12)
delete object 12
time# = 0
endif
if bulletno = 1
move object 13,10
endif
`Objects dieing from missle
if object collision (13,2) then delete object 2 : delete object 13 : bulletno = 2
if object collision (13,3) then delete object 3 : delete object 13 : bulletno = 2
if object collision (13,4) then delete object 4 : delete object 13 : bulletno = 2
if object collision (13,5) then delete object 5 : delete object 13 : bulletno = 2
if object collision (13,6) then delete object 6 : delete object 13 : bulletno = 2
I have 2 bugs with it.
1) When i press space the camera quickly flashs to where the bullet starts then back to normal
2) When the bullet collides with an object i get object does not exist at line 147
Also, i would like it so i use the mouse to look left and right and to fire. How can i do that?
Thanks in advance