• 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.

[Spell] [Need fast answer] how to check food limit

Status
Not open for further replies.
Level 17
Joined
Jan 21, 2010
Messages
2,111
How to check other player's food limit?
The scenario is like this:
1. Player 1 buy a unit
2. The sold unit goes into the player 10's control
3. if the player 10's food max is reached (here is 50), then the unit will be removed
The food max should be config able
 
well these are the only food used intergers to check how much the player has
  • Conditions
    • ((Owner of (Triggering unit)) Food used) Greater than 50
    • ((Owner of (Triggering unit)) Food cap) Greater than 50
    • ((Owner of (Triggering unit)) Food max) Greater than 50
and also I think when the unit changes owner it automatically uses the food before this event.

edit: also you can use some calculations with the buildings that produce food and how much they give and then sum it up at the end how much food you have.
gtg for now.
 
Status
Not open for further replies.
Top