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

Custom Food and Power System

Status
Not open for further replies.
Well, I need the custom food system and the power system. The original food system has a limit of 300, while I also need a separate power system (based on Yuri's Revenge power system).

Any ideas?

The custom food system should also include food produced by pre-placed food-generating structures, same as power system. A player can see friendly food and power by selecting on one of their generator structures by a game text.

Power system: Most of the base structures require power. for production structures, if there is not enough power, it will produce units more slowly. for defensive structure, it will not work. for superweapons, it will pause its superweapon ability etc.
 
Last edited:
You need to give much more detail for the power system.

For food you can get rid of the old food and limit the unit creation if the player has used all their food. Use an integer array to store the good they have. And another integer array to store the amount of food used. You can use my system item and unit cost system to tell how much food a unit takes. Then you increase the amount of food used. It also detects units that increase max food.
Whenever a unit is created you check how much food it cost using my system. Then increase the integer array for that player based on if it increases max food or if it increase the food consumption. Then you set the players food resource to 0. ( not the arrayed resource just the one in the top right. ) this will prevent you from hitting the limit and implementing your own food system.
 
You need to give much more detail for the power system.

For food you can get rid of the old food and limit the unit creation if the player has used all their food. Use an integer array to store the good they have. And another integer array to store the amount of food used. You can use my system item and unit cost system to tell how much food a unit takes. Then you increase the amount of food used. It also detects units that increase max food.
Whenever a unit is created you check how much food it cost using my system. Then increase the integer array for that player based on if it increases max food or if it increase the food consumption. Then you set the players food resource to 0. ( not the arrayed resource just the one in the top right. ) this will prevent you from hitting the limit and implementing your own food system.

hmm... but can you write gui example for me? seems complicated......unless there's a gui image for me
 
Status
Not open for further replies.
Top