Spawn AI out of array?

Im trying to develop a mount and blade style game in which two sides of AI fight. I would like to store all of my AI in a array, edit how many AI are in the array and spawn them from the array. How would i go about adding this system?

I’ve been at this for a couple of days with no good results any help?

will the ai be in an array from the start or are you adding them from elseware?

basically your going to want to create the array of the type of your ai, either in a blueprint actor or in the level bp, make it public so its easy to edit if its in a actor bp, then you want to get the array and do a for each loop that spawns the actor from class.

it would however probably be easier to forgo the array and just use a for loop and a variable that tells how many times to run it aka how many things to spawn.