So you want the oldest tumor from the caster to be destroyed when a new one is made? I would make the ability use a global Search Area effect that applies a buff stack when used. Using the history field of the Unit Compare Behavior Count validator (like the liberator) you could make the buff stacks only be applied to tumors spawned by the caster via a marker buff applied by the Create Unit effect or Build ability used. Then using a Switch effect under the search you could kill any tumour with 3 buff stacks if they belong to the caster.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
So you want the oldest tumor from the caster to be destroyed when a new one is made? I would make the ability use a global Search Area effect that applies a buff stack when used. Using the history field of the Unit Compare Behavior Count validator (like the liberator) you could make the buff stacks only be applied to tumors spawned by the caster via a marker buff applied by the Create Unit effect or Build ability used. Then using a Switch effect under the search you could kill any tumour with 3 buff stacks if they belong to the caster.
This assumes the tumors cannot be killed as the result of combat damage or triggers and only by recasting the ability.
Zagara from Heroes of the Storm uses this mechanic on her Nydus Worm ultimate. Probious uses this mechanic on his Pylon trait. I wonder how Blizzard implemented it there...
Trigger approach would be on unit creation to add tumors to a unit group (might need to also purge dead ones from the group) and if the count of units in the group is greater than 3 then remove the first of group tumor (which is hopefully the oldest).
If one uses the spawn behaviour one might be able to achieve a similar result as that behaviour already has a spawn limit and automatically has a first made first dead result to spawning units past the limit.
Ok you could also give the tumours a damage response on death that adjusts stacks of the remaining units.
How many of these units will each player typically have?
I shall assume you are planning on using an Effect - Target type ability similar to how the raven does auto turrets? This ability will use a Create Unit effect to make your unit but also use a Set effect under the Effect: Effect - Spawn field.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have a unit that has an ability to spawn creep tumors we he want on the map.
The ability has 3 charges, and they have 5 sec reload cooldown.
However, I want to make it that if there is already 3 creep tumors spawned, and the unit spawn a 4th creep tumors, it then delete one of the three
tumors on the field (the first casted would be nice) to add this new one.
Can anybody help me with how I could do that in the data editor?
Thanks!
So you want the oldest tumor from the caster to be destroyed when a new one is made? I would make the ability use a global Search Area effect that applies a buff stack when used. Using the history field of the Unit Compare Behavior Count validator (like the liberator) you could make the buff stacks only be applied to tumors spawned by the caster via a marker buff applied by the Create Unit effect or Build ability used. Then using a Switch effect under the search you could kill any tumour with 3 buff stacks if they belong to the caster.
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
This assumes the tumors cannot be killed as the result of combat damage or triggers and only by recasting the ability.
Zagara from Heroes of the Storm uses this mechanic on her Nydus Worm ultimate. Probious uses this mechanic on his Pylon trait. I wonder how Blizzard implemented it there...
Trigger approach would be on unit creation to add tumors to a unit group (might need to also purge dead ones from the group) and if the count of units in the group is greater than 3 then remove the first of group tumor (which is hopefully the oldest).
If one uses the spawn behaviour one might be able to achieve a similar result as that behaviour already has a spawn limit and automatically has a first made first dead result to spawning units past the limit.
Hey guys! Thanks for the reply.
I think I understand what Evil is saying, but I really don't know how to do that.
Maybe more explanation would help me out on the thing I am trying to do.
Ok you could also give the tumours a damage response on death that adjusts stacks of the remaining units.
How many of these units will each player typically have?
I shall assume you are planning on using an Effect - Target type ability similar to how the raven does auto turrets? This ability will use a Create Unit effect to make your unit but also use a Set effect under the Effect: Effect - Spawn field.
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