Hey!
So I’ve been stumbling on this for a while but just cant wrap my head around it. Perhaps someone a bit more savvy than me could help me out a bit?
What i have at the moment:
So i have managed to create a spawn point that spawns actors [Units that are not player controlled] into the game, they currently spawn in waves of a pre-defined time (10 seconds between waves) and pre-defined units (spawn 1 Human and 1 Alien per wave).
What I am trying to achieve:
First of all i want to make it so i can place 2 of these spawning points into my game and any units spawned by each one will determine the faction that unit belongs to (i.e. any units spawned from the right side will belong to blue team and any spawned from left side will belong to red team).
Secondly I dont want to pre-define what units will be spawned from each point. Im trying make a condition that adds a unit to an array and the spawn point spawns all units that exist in that array at the defined interval (i.e. if X condition is true add unit Y to array with a looping spawn time of 10 seconds) the spawn point will then spawn unit Y every 10 seconds. Likewise for each occurrence of condition X that exists (i.e.3 times) the actor will be added to the array 3 times and therefore 3 would be spawned.
End Goal:
Condition X Exists 3 times (Unit X - spawn time 10 seconds)
Condition Y Exists 4 times (Unit Y - spawn time 6 seconds)
Condition Z Exists 1 times (Unit Z - spawn time 12 seconds)
So the spawn point should spawn the relevant units at the relevant time intervals. i.e. 3 of unit X every 10 seconds + 4 of unit Y every 6 seconds + 1 of unit Z every 12 seconds. If it helps and if my math is correct that should be that should be 31 units in 30 seconds providing all conditions existed at the outset.
Sorry if my explanation wasn’t very good. Like i said i really just cant get my head around it.
Thanks!