Ended up doing a charge based system where spawn unit charges are not automatically restored over time. Spawn unit ability applies a buff behavior to the unit that has a second effect triggering on death response, restoring a charge to the spawner.
Looks like this probably isn't gonna get any replies, so if anyone from the future finds this with the same problem, I'm gonna try using charges for the Spawn Unit ability.
Hey, this is probably a triggers problem, but I am hoping this can be done in Data. If not please let me know the trigger solution.
For simplicity sake, I have a Barracks "spawner" unit. It has a passive ability that spawns a Marine every 10 seconds. This ability is auto cast. I want each barracks to have a cap for the max amount of units it can have alive at one time. Let's say 10 Marines is the cap. If 10 Marines from that Barracks are alive, it won't make any more until one dies. (Each Barracks has its own cap, rather than all Barracks sharing the same cap) I believe the arcade game Zerg Hex uses something like this.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ended up doing a charge based system where spawn unit charges are not automatically restored over time. Spawn unit ability applies a buff behavior to the unit that has a second effect triggering on death response, restoring a charge to the spawner.
Looks like this probably isn't gonna get any replies, so if anyone from the future finds this with the same problem, I'm gonna try using charges for the Spawn Unit ability.
Hey, this is probably a triggers problem, but I am hoping this can be done in Data. If not please let me know the trigger solution.
For simplicity sake, I have a Barracks "spawner" unit. It has a passive ability that spawns a Marine every 10 seconds. This ability is auto cast. I want each barracks to have a cap for the max amount of units it can have alive at one time. Let's say 10 Marines is the cap. If 10 Marines from that Barracks are alive, it won't make any more until one dies. (Each Barracks has its own cap, rather than all Barracks sharing the same cap) I believe the arcade game Zerg Hex uses something like this.