Target units in a cone or line clarification.

Solu9

You can change this now in User CP.
Reaction score
216
So I know how to target units in a circle around the hero. But how do I target units in a frontal cone or line?
 

NotInTheFace

Member
Reaction score
17
Unfortunately, there's no built-in way. You have 2 options:

1) split up the area you want to target into a bunch of circles

2) use a big circle that covers your entire target area and then ignore any units not in your cone/line.

The good news is you finally get to use something from your geometry class :)
 

Solu9

You can change this now in User CP.
Reaction score
216
The good news is you finally get to use something from your geometry class
....crap



For the second option. Could you create a small trigger to show how it could be done?

Edit: FYI I got the trigger to work. Here it is.

Trigger:
  • Power Strike Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Power Strike (Sleep)
    • Actions
      • Set PowerStrike_CastUnit = (Position of (Casting unit))
      • Set PowerStrike_TargetUnit = (Target point of ability being cast)
      • Unit Group - Pick every unit in (Units within 800.00 of PowerStrike_CastUnit matching (((Owner of (Matching unit)) Equal to Player 1 (Red)) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set PowerStrike_Loc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer((Angle from PowerStrike_CastUnit to PowerStrike_Loc))) Greater than or equal to (Integer(((Angle from PowerStrike_CastUnit to PowerStrike_TargetUnit) - 30.00)))
              • (Integer((Angle from PowerStrike_CastUnit to PowerStrike_Loc))) Less than or equal to (Integer(((Angle from PowerStrike_CastUnit to PowerStrike_TargetUnit) + 30.00)))
            • Then - Actions
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Real((Intelligence of (Casting unit) (Include bonuses)))) + ((Real((Strength of (Casting unit) (Include bonuses)))) x 2.00)) damage of attack type Normal and damage type Normal
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
          • Custom script: call RemoveLocation (udg_PowerStrike_Loc)
      • Custom script: call RemoveLocation (udg_PowerStrike_CastUnit)
      • Custom script: call RemoveLocation (udg_PowerStrike_TargetUnit)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top