I have no experience with functions that deal with units, so this is basically going to be a request for a completed trigger that I can use as a starting point and to learn from.
So, can someone post a trigger that would loop through all buildings owned by a given player, totalling up the mineral cost of each building and printing the total amount to the screen?
You should really learn how to do some of this yourself as its really quite simple but here is a starting point. You'll need a local variable. Use a pick each units loop with matchings conditions in regions; conditions being structures. Within the loop add the modify variable action which is set to cost of picked unit. Outside of the loop at the end just a text message converting the number of the variable to text.
Rollback Post to RevisionRollBack
When I want your opinion...I'll give it to you!
To post a comment, please login or register a new account.
I have no experience with functions that deal with units, so this is basically going to be a request for a completed trigger that I can use as a starting point and to learn from.
So, can someone post a trigger that would loop through all buildings owned by a given player, totalling up the mineral cost of each building and printing the total amount to the screen?
You should really learn how to do some of this yourself as its really quite simple but here is a starting point. You'll need a local variable. Use a pick each units loop with matchings conditions in regions; conditions being structures. Within the loop add the modify variable action which is set to cost of picked unit. Outside of the loop at the end just a text message converting the number of the variable to text.