Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Disadvantage of such system is that you actually need to capture all events "Unit begins training a unit" and check if there's enough food for the unit.
Disadvantage of such system is that you actually need to capture all events "Unit begins training a unit" and check if there's enough food for the unit.
The unit trained is a dummy unit, and the dummy unit has a Chaos ability that morphs it into a counterpart unit which has no food cost, you check for if the training is finished, then set the food?
Of course, this doesn't have to be for EVERY SINGLE UNIT in the game, just the ones he wants. Unless the ones he wants is every single unit in the game...
I see. Well that's most unfortunate. I suppose I'll need to remove the food cost from certain units. Thanks for the help, both of you. I appreciate it!
You can do this.
MindControlledUnits is a player group variable with array with size 17
The reason of second trigger is, when unit dies or gets mind controlled by someone else the game will probably(I didnt test) decrease its food from player so we need to fix this.
Disable Cost
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mind Control
Actions
Player - Set (Owner of (Triggering unit)) Food used to (((Owner of (Triggering unit)) Food used) - (Supply used by (Target unit of ability being cast)))
Unit Group - Add (Target unit of ability being cast) to MindControlledUnits[(Player number of (Owner of (Triggering unit)))]
Fix Cost
Events
Unit - A unit Dies
Unit - A unit Changes owner
Conditions
((Triggering unit) is in MindControlledUnits[(Player number of (Owner of (Triggering unit)))]) Equal to True
Actions
Unit Group - Remove (Triggering unit) from MindControlledUnits[(Player number of (Owner of (Triggering unit)))]
Player - Set (Owner of (Triggering unit)) Food used to (((Owner of (Triggering unit)) Food used) + (Supply used by (Triggering unit)))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.