
-----------------------------------
CyberStorm
Sun Jun 05, 2011 4:25 pm

Could use some help
-----------------------------------
What is it you are trying to achieve?
in my shooting game, when an enemy dies the health, which is stored in a flexible array, has to be deleted from memory so the image of it doesnt appear anymore on the screen. 

What is the problem you are having?
this involves moving down all of the array values stored above the array slot that needs to be deleted, and apparently something is not coded right because when i sometimes kill an enemy, another enemy disappears instead of the one i was aiming at. i hope you could help me pinpoint the specific logic error in the following code, or give a few advices about where to look for the error in the rest of the program.
i would try and output health values in the array and solve this on my own, but im using 'cls' a lot due to the animation necessities, and i cant figure out how i could ouptut the values in a separate window so cls doesnt interfere.


Post any relevant code 



for i : 1 .. numtarg
                            if xshot >= x1 (i) and xshot = y1 (i) and yshot 