Christopher Risdon
Member
I need help with developing a shooting system for an array of enemy similar to that of a space invaders game. I need an adaptive system that can shoot in 4 cardinal directions based on player position. Say we have an array of 10x10
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
Now only the "bottom" most enemies must fire. I already have detections for where the player is. Now the player can destroy any of these enemies from different angles. This creates holes in the pattern. What I need is a way for the enemies to be able to fire and not hit into each other, akin to the space invaders game. I am having difficulty in figuring out how to do the appropriate checks for this.
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
+++++++++
Now only the "bottom" most enemies must fire. I already have detections for where the player is. Now the player can destroy any of these enemies from different angles. This creates holes in the pattern. What I need is a way for the enemies to be able to fire and not hit into each other, akin to the space invaders game. I am having difficulty in figuring out how to do the appropriate checks for this.