Well the only loop I'm using for it is a for loop:
for i=0 to 10
if (object exist(enemy(i))>0)
if (intersect object(modelBuilding,limb position x(playerObj,1),limb position y(playerObj,1),limb position z(playerObj,1),X#,Y#,Z#) < intersect object(enemy(i),limb position x(playerObj,1),limb position y(playerObj,1),limb position z(playerObj,1),X#,Y#,Z#))
sprite 4,screen width()/2-16,screen height()/2-16,spriteCrosshairAimed
if (mouseclick()=1 and keystate(19)=0 and reloading#=0 and ammo>0) then delete object enemy(i)
endif
endif
next
Ending it doesn't seem to do anything. Also, I'm still able to shoot through multiple enemies, so I'll need to exit the loop after I hit the first enemy as well. Could you post an example code of how to do this please? I've tried everything I could think of.