• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

food limit increased if research is done

Status
Not open for further replies.
Level 6
Joined
Sep 24, 2015
Messages
174
Well, i wanna know if it's possible to increase a players food limit by 1 for exemple each time he does 1 specific research?
 
Possible using triggers. Except that an upgrade cannot be researched multiple times. Maybe you mean different levels of the upgrade, if you say "each time it is researched".
  • Food
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to More Food
    • Actions
      • Player - Add 1 to Player 1 (Red) Food cap
      • Player - Add 1 to Player 1 (Red) Food max
Food cap and food max: one of them is the total food limit (100 by default) the other one is the food limit depending on number of farms. I don't know which one does what.
 
yes level of rsearch = expending the food limit by 1
level 2 = expending the food limit by 1
...
level 10 = expending the food limit by 1
 
Last edited:
  • Food
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Iron Forged Swords
    • Actions
      • -------- Total Limit: --------
      • Player - Add 1 to (Triggering player) Food max
      • -------- Farm Food: --------
      • Player - Add 1 to (Triggering player) Food cap
Food max = total limit
Food cap = current limit depending on farm number

If you want to change the total limit, you first have to enable it to be higher than 100 in the gameplay constants: Food Limit set to 300 for example
Now you use a trigger to set the default food limit to 100: (do so for every player)
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Food max to 100
Your default food limit is now 100 for every player, but because of the gameplay constants you can increase the food limit to up to 300 with triggers.
Whenever the upgrade is researched the food limit is increased by 1 for that player. So you also don't have to worry about upgrade levels in the trigger.
 
Status
Not open for further replies.
Back
Top