Events
UI - Player 1 clicks Left mouse button Down.
Local Variables
TargetGroup = (Units in Region 001 having alliance Enemy with player 1 matching Excluded: Air, Missile, Dead, Hidden, with at most Any Amount) <Unit Group>
Target = (Closest unit to (Position of Preserver (C) [46.62, 45.40]) in TargetGroup) <Unit>
Conditions
Actions
Animation - Play Attack animation for (Actor for Preserver (C) [46.62, 45.40]) as Default, using No Options options and Default Time blend time
General - If (Conditions) then do (Actions) else do (Actions)
If
(Facing of Preserver (C) [46.62, 45.40]) == (Angle from (Position of Preserver (C) [46.62, 45.40]) to (Position of Target))
(Number of Living units in TargetGroup) > 0
Then
Environment - Execute TTychus03 - Queen Of Blades - Psi Blast (Launch Missile) on Target from Preserver (C) [46.62, 45.40]
Else
If works if i remove the condition of the facing angle but then it just attacks anyone in that region, is there a way that the unit has to be facing his target?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Events
UI - Player 1 clicks Left mouse button Down.
Local Variables
TargetGroup = (Units in Region 001 having alliance Enemy with player 1 matching Excluded: Air, Missile, Dead, Hidden, with at most Any Amount) <Unit Group>
Target = (Closest unit to (Position of Preserver (C) [46.62, 45.40]) in TargetGroup) <Unit>
Conditions
Actions
Animation - Play Attack animation for (Actor for Preserver (C) [46.62, 45.40]) as Default, using No Options options and Default Time blend time
General - If (Conditions) then do (Actions) else do (Actions)
If
(Facing of Preserver (C) [46.62, 45.40]) == (Angle from (Position of Preserver (C) [46.62, 45.40]) to (Position of Target))
(Number of Living units in TargetGroup) > 0
Then
Environment - Execute TTychus03 - Queen Of Blades - Psi Blast (Launch Missile) on Target from Preserver (C) [46.62, 45.40]
Else
If works if i remove the condition of the facing angle but then it just attacks anyone in that region, is there a way that the unit has to be facing his target?