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

[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