• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Change food via trigger

Status
Not open for further replies.
Level 4
Joined
Nov 18, 2021
Messages
41
I might be blind but I cant seem to find action to change food cost of a unit.
Long story short I have a map where peon spawns every several seconds, then when a production building starts training a unit, a random peon comes close to it. After training is finished, said peon disappears. Instead of farms, abovementioned peons provide food, so I would like created unit to have 0 food cost while it had normal one before.

If you can suggest an alternative way to make it so you can only train units if you have an appropriate number of peons and those peons "transform" into trained units that would also be appreciated.
 
Level 4
Joined
Nov 18, 2021
Messages
41
do you want 1 peon to turn into 1 unit, or when you make a knight suddenly 5 peons (assuming a knight is 5 food) dissappear ?
Pretty much the 2nd option
I have tier 1 organic units with 1 unit for 1 peon
and tier 2 mechanical units with 1 unit for 2-4 peons
(except mortar team that requires 2 units)
 
Level 4
Joined
Nov 18, 2021
Messages
41
I think you'll need 2 versions of each unit-type, one with food cost and one without. Then replace newly created units with their food-free versions.
that will work, tyvm
damn this trigger thing really makes u think out of the box xd
 
Level 6
Joined
Oct 31, 2015
Messages
95
Idk if I really understood the nature of your request @Aiun, in any case, you can use:

  • Unit - Disable supply usage for (Triggering unit).

or whatever unit you may need. This will disable the food cost for that specific unit. Not guaranteed to work with transformations...
 
Status
Not open for further replies.
Top