- Joined
- Jul 25, 2009
- Messages
- 3,091
I've been trying to make a system where every unit in a given unit group (Group A) will attack a unit they deem their target (Group B)... Each unit in Group A has its own unique target in Group B unless of course Group B only contains 1 unit then all units in Group A would have the same target.
Problems...
1. Selection how can I make each individual unit in Group A select the unit closest to them with the highest "Aggro" (The "Aggro" is just a real I created to improve realism in the system) in Group B. Each unit has to select the target individually because some of the units will be in different locations drastically far away from each other.
2. Attacking, I want them to Attack-Move to their target, not Attack the target (Unit from Group B). If they attack the target they will not attack nearby targets that are closer, they will just continue chasing their target.
Problems...
1. Selection how can I make each individual unit in Group A select the unit closest to them with the highest "Aggro" (The "Aggro" is just a real I created to improve realism in the system) in Group B. Each unit has to select the target individually because some of the units will be in different locations drastically far away from each other.
2. Attacking, I want them to Attack-Move to their target, not Attack the target (Unit from Group B). If they attack the target they will not attack nearby targets that are closer, they will just continue chasing their target.