How to spawn enemies in a pattern?

Im trying to spawn multiple enemies at once in different patterns (such as a straight line or V shape). I want to have a few sets of these patterns and randomly call them and to have the enemies spawn in specific points to make the shape them from a script. I tried using arrays but I’m not sure if I did them right? Anyone can help?

Always a good idea to post what you have done/tried, even if it doesn’t work or you got stuck and never got to the point you could even test it.

Arrays may be of use depending on how you go about things, but this all sounds very ‘procedural’ and would probably be best implemented using a function per formation, taking a location vector, forward vector & number of enemies to spawn as parameters, along with other relavent things as needed (enemy type to spawn? maybe some formation specific params (angle for the V, spacing, etc)).

Each function would then use what params you gave it to determine what to spawn where, all calculated on the fly, no arrays.