I'd still love to have some way of asking a unit what its various weapons are currently aiming at (without trying to trap them with events, that doesn't always seem to work apparently).
Here is my trigger which adds the units to the unit groups.
ArmyGroupEventsUnit-AnyUnitisissuedanordertoAnyAbilityCommand//I've also tried AttackLocalVariablesa=0<Integer>//a is for the player whos point is being targeted. Each player has their own point associated.ConditionsActionsGeneral-Foreachintegerafrom1to6withincrement1,do(Actions)//there are 6 players, 2 teams of 3ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Targetpointfor(Triggeringorder))==hp1[3][a] //hp1 is an array of points. For each player, the point that gets targeted is set to hp1[3][<thattargetedplayer>]
Then
Unit Group - Add (Triggering unit) to TargetingPlayer[a] //a unit group
Else
Are there any holes in my logic or a better way I shuold be doing this?
I need to know if there is a way to return all the units which have been issued the order to attack another specific unit.
Or if there is a way to know when a unit is issued that order so that I can add them to a unit group and then pick that unit group to return them.
Is this possible? Thanks.
Well there is the Unit is under attack event might not work till he actually gets hit
How about all units which are, for example, attack-moving a specific point?
@Acren: Go
Thanks, but is there a way to specify the order as attacking a specific point? (with attack move)
Context: Varying units are ordered to attack move to a point. At that point there is a command center.
The units will kill everything in their path and eventually the command center.
After the command center is destroyed, I want all the units which are at the command center or on their way to it, to die.
I can't seem to find away to detect the point which a unit is targeting though
@Acren: Go
Umm
You need to use two events
then you need some logic to check whethor or not there is a targeted unit or point
you can check against "unit - target of order... if its not set I believe it ='s "no unit"
@Acren: Go
(X of (Target point for ((Picked unit) order at index 0))) == 0.0
Etc., etc.
@OneSoga: Go
Sveet, this is quite useful. Thank you.
I'd still love to have some way of asking a unit what its various weapons are currently aiming at (without trying to trap them with events, that doesn't always seem to work apparently).
I still cant get it working.
Here is my trigger which adds the units to the unit groups.
Are there any holes in my logic or a better way I shuold be doing this?
EDIT: Nevermind, I got it. Thanks guys.