Sorry for the vague Title I didn't know how else to word it.
Basically I want some buildings to limit the total amount of minerals the player can hold. The idea is they build more of them if they want to hold more minerals. I am trying out having Energy on these buildings and the energy will build up (Instead of minerals) with the limit being on the unit already. I can count the Energy a buildings has but I'm not sure how to count every building they have and create a total from that.
Lets say there are 2 buildings. 1 gives 1000 more limit, the other gives 2000. If the player builds 2 building 1's but 3 building 2's I know the limit is going to be 8000 but how do I get the game to do that. How do I count the amount of each the player has and count the Total maximum and the Total current.
Also if there is an easier way to do this please tell me. I want it to seem easy to understand and easily visible, I know Command and conquer did something similar which felt nice.
Is there a way to split the resources equally to the buildings "energy". So you have 5 buildings that hold 2000 and you have 5000 resources, they each have 1000/2000 personal maximum and 5000/10000 overall maximum.
I know how to do it in my head but not with Triggers. If I knew how to count the number of Building 1's on the screen and the number of Building 2's and add them together then divide that by the total they hold then give each of them the result - the total would be the same and it would be equally split. Just don't know the command to do that in the Editor.
Sorry for the really strange idea too, if anyone can give me a hand that would be absolutely fantastic.
Thanks in advance.
V
EDIT - Just to add I know how to do it with triggers and minerals. But I would prefer to do it with energy as the player can see how much each building is holding (So if they sell that building they lose the energy/minerals it is holding). It seems odd having Energy as minerals but they just fit perfectly into how I want it to work.
The way it worked in the original command and conquer is that you had a base Tib. capacity, which could be expanded by additional refineries or silos. Tib. capacity was a formula something like:
Hey,
Sorry for the vague Title I didn't know how else to word it.
Basically I want some buildings to limit the total amount of minerals the player can hold. The idea is they build more of them if they want to hold more minerals. I am trying out having Energy on these buildings and the energy will build up (Instead of minerals) with the limit being on the unit already. I can count the Energy a buildings has but I'm not sure how to count every building they have and create a total from that.
Lets say there are 2 buildings. 1 gives 1000 more limit, the other gives 2000. If the player builds 2 building 1's but 3 building 2's I know the limit is going to be 8000 but how do I get the game to do that. How do I count the amount of each the player has and count the Total maximum and the Total current.
Also if there is an easier way to do this please tell me. I want it to seem easy to understand and easily visible, I know Command and conquer did something similar which felt nice.
Is there a way to split the resources equally to the buildings "energy". So you have 5 buildings that hold 2000 and you have 5000 resources, they each have 1000/2000 personal maximum and 5000/10000 overall maximum.
I know how to do it in my head but not with Triggers. If I knew how to count the number of Building 1's on the screen and the number of Building 2's and add them together then divide that by the total they hold then give each of them the result - the total would be the same and it would be equally split. Just don't know the command to do that in the Editor.
Sorry for the really strange idea too, if anyone can give me a hand that would be absolutely fantastic. Thanks in advance. V
EDIT - Just to add I know how to do it with triggers and minerals. But I would prefer to do it with energy as the player can see how much each building is holding (So if they sell that building they lose the energy/minerals it is holding). It seems odd having Energy as minerals but they just fit perfectly into how I want it to work.
@Virgz: Go
The way it worked in the original command and conquer is that you had a base Tib. capacity, which could be expanded by additional refineries or silos. Tib. capacity was a formula something like:
Capacity = (# silos * silo_capacity) + (# refineries * refinery_capacity).
I think you only lost tiberium if a building was sold / destroyed and (current tiberium > capacity == true)
Wouldn't it be easier to have a single variable storing capacity? This is the trigger forums after all, energy sounds like a weird data solution hack.