• 🏆 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!

How to make units produce food?

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2005
Messages
73
Wondering if anyone has suggestions on how I should go about making a Unit Incrementally Produce food


I need it to increase the food produced by a unit once every wave of creeps? Anyone got sugguestions? Id prefer a trigger or somthing rather then make a whole crapload of units
 
Level 4
Joined
Jan 14, 2005
Messages
73
I did what hellbreed said, works thanks.

EDIT:Thought It was working turns out that whenever i set the max food or cap the food it doesnt do anything :\ sets it too 0/1 food

I also am unable to set the used food? Anyone got a quick sample map or somthing?
 
Last edited:
Level 13
Joined
May 11, 2008
Messages
1,198
if you want to add food used for some crazy reason just use dummy units i guess(make sure they cost food, usually they wouldn't, and don't let them die...usually you kill them).

my tdht map actually manipulates food used...in fact it does it for the victory and defeat triggers. it's kinda nice i guess cuz you can make an event that checks for when the resource gets to a certain number, and run some stuff to respond to that.
 
Level 4
Joined
Jan 14, 2005
Messages
73
It seems the trigger i had set up to set the Food cap wasn't working for some reason, I fixed it by tweaking it a bit :\ not really sure what i did lol.
 
if you want to add food used for some crazy reason just use dummy units i guess(make sure they cost food, usually they wouldn't, and don't let them die...usually you kill them).

my tdht map actually manipulates food used...in fact it does it for the victory and defeat triggers. it's kinda nice i guess cuz you can make an event that checks for when the resource gets to a certain number, and run some stuff to respond to that.

There is no reason to create dummies. Usually, in maps that do not use Food property, Food is used as a timer. So, those maps don't create dummies every second. He could use this:
  • Trig
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Food used to (((Picked player) Food used) + 1)
;]
 
Status
Not open for further replies.
Top