I think a requirement could work, use Less Than -> Count Unit (spawned unit) Queued or Better at Unit -> Constant 3. This is how the Carrier limits its production.
There are campaign abilities like that. For example the new LOTV campaign has an ability to have 2 zealots come, and I think Kerrigan had something similar in HOTS. You could experiment with dependencies in another map since removing dependencies is a pain.
You could also just make a spawn unit ability and have it give a stackable behavior to the source unit that would be removed when the spawned unit dies, just set the max stack to 3. I would probably actually just do it this way, much simpler. You would also make a validator to check how many behaviors are active.
There are campaign abilities like that. For example the new LOTV campaign has an ability to have 2 zealots come, and I think Kerrigan had something similar in HOTS. You could experiment with dependencies in another map since removing dependencies is a pain.
You could also just make a spawn unit ability and have it give a stackable behavior to the source unit that would be removed when the spawned unit dies, just set the max stack to 3. I would probably actually just do it this way, much simpler. You would also make a validator to check how many behaviors are active.
How would I make a unit which would peridocally spawn units. But only have up to 3 alive at a time.
I.e have 3 units spawned, and one dies, it will spawn another one, and stop spawning until another one dies.
I was thinking of a hangar ability, but I can't figure out how to release the units and still count them - or if it's even possible.
I think a requirement could work, use Less Than -> Count Unit (spawned unit) Queued or Better at Unit -> Constant 3. This is how the Carrier limits its production.
You could also look at the mothership and mothership core as examples.
Use a Spawn type behavior. See the spawning of larva by the Hatchery/Lair/Hive for an example.
There are campaign abilities like that. For example the new LOTV campaign has an ability to have 2 zealots come, and I think Kerrigan had something similar in HOTS. You could experiment with dependencies in another map since removing dependencies is a pain.
You could also just make a spawn unit ability and have it give a stackable behavior to the source unit that would be removed when the spawned unit dies, just set the max stack to 3. I would probably actually just do it this way, much simpler. You would also make a validator to check how many behaviors are active.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Will probably do this :) Thanks :)
Do not forget the Arm Magazine ability like the broodlord uses for only having two broodlings following it at once.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg