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

[General] Limiting food acording to allies

Status
Not open for further replies.
Level 19
Joined
Jan 12, 2011
Messages
1,523
I need a system that uses the native function
Player - Set Player X (x) Food max X

That works like this, if the player is alone he has 300 food max, if he has 1 ally (they are two in total) each of them get 150 food available, if they are 3 allied each get 100 food available, if they are 4 or more they all get 75 food max.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
It won't be accurate, though - that number can only be integer, but if you have 7 players, then it would make 42,85 food per player, which will make it round down to 42.
That way you would distribute 294 food instead of if you have 7 players.

I think this is it
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set Integer_var = (Integer((300.00 / (Real((Number of players in (All players controlled by a User player)))))))
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Food cap to Integer_var
It may be Food max instead of Food cap (not sure which one it is atm)
You may also need to go to Gameplay Constants and change Food Limit to 300
 
Last edited:
Level 19
Joined
Jan 12, 2011
Messages
1,523
Yeah you are right it's food max, and about gameplay constants i already did

edit:

isn't your system just made for player 1?


The system i'm making is for a game with 12 players each in a diferent alliance group
 
Last edited:
Status
Not open for further replies.
Top