Is there a way so that a units attribute can be detected through triggers. So as to take that units combined with other units attributes and combine them into a variable. Lets say player one has 3 buildings each with the same attribute but each building has a different number of attributes. Building one has 20, Building 2 has 15, and building 3 has 45. I want to be able to get those numbers from each building and store them in a variable which would = 80 in this case.
What are attributes? HP? Energy? Height? Then use the function Unit Property to get the value, and store it to a local variable and modify it using the actions Set Variable and Modify Variable, respectively.
If you want to set or get custom "attributes", use the action Set Unit Custom Value (which act like an real array of size 64 with index/value pair), and use the function Unit Custom Value to get the value you assigned.
Be less ambiguous with your questions and you may get more replies.
Is there a way so that a units attribute can be detected through triggers. So as to take that units combined with other units attributes and combine them into a variable. Lets say player one has 3 buildings each with the same attribute but each building has a different number of attributes. Building one has 20, Building 2 has 15, and building 3 has 45. I want to be able to get those numbers from each building and store them in a variable which would = 80 in this case.
What are attributes? HP? Energy? Height? Then use the function Unit Property to get the value, and store it to a local variable and modify it using the actions Set Variable and Modify Variable, respectively.
If you want to set or get custom "attributes", use the action Set Unit Custom Value (which act like an real array of size 64 with index/value pair), and use the function Unit Custom Value to get the value you assigned.
Be less ambiguous with your questions and you may get more replies.
Veterancy attributes are buffs. Just count the number of buffs of the type you want on each unit.