- Joined
- Mar 17, 2005
- Messages
- 135
How would you go about adding a unit to an array like this.
variable unit_count of type unit with array set to 20.
Each time my loop loops, I want it to set the picked unit to the next number.
lets say pick every unit within range of x unit
set unit_count[0] = picked unit.
How do I make it so that every time it loops, unit_count goes up by 1 but also keeping the last picked unit in the array. Hard for me to explain.
In finalization, I would like to store units that are within range of another unit. Once I aquire all units within range of that particular unit, I want to take the stored unit_count arrays and damage all of those units.
Sorry if i'm confusing. +rep for those who give constructive help please!
variable unit_count of type unit with array set to 20.
Each time my loop loops, I want it to set the picked unit to the next number.
lets say pick every unit within range of x unit
set unit_count[0] = picked unit.
How do I make it so that every time it loops, unit_count goes up by 1 but also keeping the last picked unit in the array. Hard for me to explain.
In finalization, I would like to store units that are within range of another unit. Once I aquire all units within range of that particular unit, I want to take the stored unit_count arrays and damage all of those units.
Sorry if i'm confusing. +rep for those who give constructive help please!