• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ability that damages unit in front of caster?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
Events
Unit Starts the effect of an abil
Cond
Ability == your abil
Actions
Pick units within range
unit group loop
->filter out unwanted units
endloop
Damage random unit from picked group

Backstab trigger:
  • Attack GUI
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • -------- -------------------------------------------------- --------
      • -------- Set unit variables --------
      • -------- -------------------------------------------------- --------
      • Set u1 = (Attacking unit)
      • Set u2 = (Triggering unit)
      • -------- -------------------------------------------------- --------
      • -------- Set location variables --------
      • -------- -------------------------------------------------- --------
      • Set p1 = (Position of u1)
      • Set p2 = (Position of u2)
      • -------- -------------------------------------------------- --------
      • -------- Clear leaks --------
      • -------- -------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Cos(((Angle from p1 to p2) - (Facing of u2)))) Greater than 0.00
        • Then - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: Backstab!
        • Else - Actions
      • Custom script: call RemoveLocation(udg_p1)
      • Custom script: call RemoveLocation(udg_p2)
Set u1 = Triggering unit, u2 = picked unit in the loop. Use less than 0 in the angle condition.
 
Status
Not open for further replies.
Top