This is probably the easiest way, since i don't think there is an Event Response for the constructing unit;
Trigger:
Remove Peasant example
Events
Unit - A unit Finishes construction
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Town Hall
Then - Actions
Unit - Remove (Random unit from (Units within 300.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to Peasant))) from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Barracks
Then - Actions
Unit - Remove (Random unit from (Units within 240.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to Peasant))) from the game
Else - Actions
Unit - Remove (Random unit from (Units within 140.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to Peasant))) from the game
This is not optimal, as there is a degree of randomness in it, but it shouldn't cause too much trouble, after all, it only removes the type of worker you choose. If many peasants are building the structure, one of them will be removed (and usually it's the one building, because of how the workers are set up near the building). The different ranges are just because some buildings are bigger, and you don't want to have too big of a range when not needed. That could result in a Peasant running by being removed. You can play around with ranges some more, and add buildings to that list, if you need to.
Right, i thought you just wanted the workers to disappear for some reason. Maybe for what you want a better solution would be;
Trigger:
Remove Peasant example
Events
Unit - A unit Begins construction
Conditions
Actions
Unit - Remove (Random unit from (Units within 150.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Equal to Peasant undead))) from the game
Just make whatever worker you use to be Undead (in Object manager, race), so the building will finish itself after the worker is removed. Then you can add perhaps your own special effects to make it look better.
If you set the Wisp's race to Undead, the classification of the building does not matter, however it might cause some unwanted complications, like healing related (holy light etc.). If the Wisp's race is default, Night Elf, then the building classification has to be ancient, or the Wisp will remain behind, and will not be removed.
Reddit, Slack, Google, Facebook, Instagram — these companies use our data — directly or indirectly — to train the next generation of AI language models. Yet, I don’t remember anyone asking our permission, and in doing so, these companies have proven the adage that customers’ data is their main...
Our new website went up early yesterday. Health Empowers You. 200 smoothie recipe guide and soon we will have detox, cognitive enhancement, weightloss teas and some coffee blends. https://healthempowersyou.net/products/smoothie-recipe-guide
It never fails that as soon as I say something about the bots they come back - this time they are under a whole new IP range - one thing in common though, Chinese!