My question : How do I add all instance variables together (If I have 2 Units on screen, and their variables are 10, how do I show that the total is 20?)

I tried using TotalCount=10*Unit.Count, but this will be a problem since the buildings will eventually not have the exact number of units inside of them (If one gets attacked and loses men).

I'm not sure if this has something to do with the TYPE of instance variable its set to (Text, number, Boolean)

I'm trying to create a swarm defense type game, where I send my units into their buildings, the person with more units wins and claims the building.

Said building creates more units and the cycle continues.

I have some buildings that contain "units" inside of them.

Is it possible to add the sum of all of the buildings to give me the total number of units on the map? I'm using a family variable, trying to modify a global variable, is this possible?

I have a feeling I should be using Arrays but I don't know exactly how.

The capx is a mess, sorry. The more I tinkered with it the worse it got.

I'm starting over with a clean event sheet, but I have no idea where to even begin to have the system add up the value of the individual instance variables.

https://drive.google.com/file/d/0B-APu8 ... sp=sharing