The lasers are not deleting correctly.They\'re supposed to be deleted when more than 500 units away, though when there are more than 1 on the screen at a time only 1 is deleted.
IF laser = 1
INC currentlaser,1
LOAD OBJECT \"laser.X\",currentlaser
POSITION OBJECT currentlaser,OBJECT POSITION X(mainship),OBJECT POSITION Y(mainship),OBJECT POSITION Z(mainship)
ROTATE OBJECT currentlaser,ncx#,ncy#,0
ROLL OBJECT LEFT currentlaser,ncz#
MOVE OBJECT LEFT currentlaser,OBJECT SIZE X(mainship)/1.5+0.25
MOVE OBJECT DOWN currentlaser,OBJECT SIZE Y(mainship)/1.5
laser = 0
ENDIF
FOR l = firstlaser TO currentlaser
IF OBJECT EXIST(l) = 1
MOVE OBJECT l,3
laserdist# = 0
distancex# = OBJECT POSITION X(l)-OBJECT POSITION X(mainship)
distancey# = OBJECT POSITION Y(l)-OBJECT POSITION Y(mainship)
distancez# = OBJECT POSITION Z(l)-OBJECT POSITION Z(mainship)
s# = distancex#^2
z# = distancey#^2
q# = distancez#^2
f# = s# + z# + q#
laserdist# = SQRT(f#)
IF laserdist# => 500
DELETE OBJECT l
DEC currentlaser,1
ENDIF
ENDIF
NEXT l