Okay, I think I'm running into another problem here with my platformer.
I have set up some random spawn points.
The enemies are set to spawn once when the layout starts. There is a 100% chance that one will spawn, and the other only has a small chance of spawning.
Here is the function I used to create the spawns:
I'm going to try and spawn maybe 15 to 20 enemies in a single level, so I will place multiple spawn boxes each as a different sprite with different code. The example above just shows the first 2.
Now, the problem I think I'm having is that if 2 or more of the same enemy spawn, they will share the A.I.. In other words, they are both acting as one unit.
I need to make sure this doesn't happen because the A.I. is quite advanced. It will attack, use line of sight, etc. So, I can't have two of the same sprite/hitbox interfering with each other.
Is there a way to set it to prevent more than one of the same unit from being spawned at the various spawn points? Otherwise, I need to find an alternative way to do this.