Having a spawned ai patrol from a spline offset to be around the enemy

Hello!

So i have a boss enemy that will spawn multiple guards around it, the boss will patrol along a spline

I want the guard enemies to also patrol off the spline, but in formaton around the boss enemy

i heard a 2d array can do it but i feel there is a simpler way and cant figure out it

thank you!

you could try just offsetting the vector, so if the boss is at (x,y,z) minion can be at (x+100, y+100, z)

you could use an array to store a formation or just math off the minion index so it works for multiple minions

thank you!

so i would like the ai to know if the ai is on the left, right, front or back of the boss to assign the correct vector offset, how would I do that

i tried google but got lost haha

its kinda depends how you implement it, if you just want to know where it is in relation you can use the DOT product. however multiple minions might try to go to the same spot this way,
what you could do is store the formation on the boss in an array, so you’d have an array of vector offsets

then when a minion requests a location you can loop over the array, get the offset add it to the boss world location to get an offset location and then check the distance from the minion to the location. this will return the closest valid location. once assigned you remove that offset from the array so the next minion doesnt try to take it