AI Spawning
Last updated
Last updated
Campaign AI units are placed in a map using AI Spawners. In order for the AI units to spawn, the boundary of the object must intersect a nav mesh. Depending on the type of AI Spawner being used, one to many campaign AI Units can be spawned at a time via droppod, Phantom, or in-place. A maximum of 32 AI units can be spawned at a time.
AI Spawners and AI Vehicle Spawners are designed to be initialized to spawn AI units at a single location. Once the first squad has spawned, these two AI Spawners will only be able to spawn AI units at the original location, even if the object itself has been moved in a script. In order to spawn AI units at different locations, the spawner must be deleted, spawned, positioned and initailized again via script before being used.
To perform the initialization, a Wait For N Seconds node can be used with its parameter set to 0 seconds. This one frame delay will allow the engine to properly initialize the AI Spawner in its new position before it is used.
Contributors
Mr. Admirals Cookies