- Joined
- May 21, 2014
- Messages
- 580
Greetings once again, Hive!
On to my point: I have browsed the questions all over the Internet, but I can't seem to find all the answers I need regarding this.
Let us say I have a unit group UnitGroup. UnitGroup is currently empty.
I add a unit called Unit1 to UnitGroup. Of course, Unit1 will be in UnitGroup. What if Unit1 dies? Will Unit1 still exist in the UnitGroup?
If so, this leads me to another question: If Unit1 really does still exist in UnitGroup, then removing Unit1 from UnitGroup means Unit1 really still exists somewhere, right? If it does exist, how do you remove Unit1 completely?
I ask this because I have to maintain a Unit Group for the AI in the map to have a randomly selected unit to attack within the Unit Group. For example, an enemy type would be commanded to attack the towers first, etc. I want to make sure that data would not leak and overflow to cause a much smoother game.
Thanks, Hive.
On to my point: I have browsed the questions all over the Internet, but I can't seem to find all the answers I need regarding this.
Let us say I have a unit group UnitGroup. UnitGroup is currently empty.
I add a unit called Unit1 to UnitGroup. Of course, Unit1 will be in UnitGroup. What if Unit1 dies? Will Unit1 still exist in the UnitGroup?
If so, this leads me to another question: If Unit1 really does still exist in UnitGroup, then removing Unit1 from UnitGroup means Unit1 really still exists somewhere, right? If it does exist, how do you remove Unit1 completely?
I ask this because I have to maintain a Unit Group for the AI in the map to have a randomly selected unit to attack within the Unit Group. For example, an enemy type would be commanded to attack the towers first, etc. I want to make sure that data would not leak and overflow to cause a much smoother game.
Thanks, Hive.