Terrabull
Veteran Member (Done that)
- Reaction score
- 38
Here is a note to all developers. The Hatchery Larva Spawn behavior has a strange limitation. The number of possible spawns is limited not only to the number you place in the limit field, but also to the number of "offsets" you define. Similarly, it will spawn nothing without any offsets set.
When the behavior spawns a building, it takes one of the offsets at random. It then temporarily removes that offset from it's list, and when the unit dies it replaces it on the list.
Because of this limitation, when every offset has a unit spawned to it the building acts just like there are no offsets in it's list, meaning it ceases to function.
The basic way to prevent this from being an issue is to add a timed life to the unit, or otherwise ensure that the units it spawns will not live long enough to fill the number of offsets.
When the behavior spawns a building, it takes one of the offsets at random. It then temporarily removes that offset from it's list, and when the unit dies it replaces it on the list.
Because of this limitation, when every offset has a unit spawned to it the building acts just like there are no offsets in it's list, meaning it ceases to function.
The basic way to prevent this from being an issue is to add a timed life to the unit, or otherwise ensure that the units it spawns will not live long enough to fill the number of offsets.