• 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.

How to make damaging heal ???

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2008
Messages
29
Hi!

I just wanna make a simple spell.
Its about a hero cast a Holy Light spell, and next to the target enemy units should suffer some damage.

How can i do this with a triger ?
 
Answer

there are two triggers which cause damage. one of them is Unit_Damage_Area which will damage all of units in an area including yours.other one is Unit_Damage_Target which will make your unit damage a single unit. you must use the second.but first pick every unit around the target point using UnitGroup_Pick_Every_Unit_And_Do_Multiple_Actions(With Units in range).
Then use If / Then / Else _ Multiple Actions. In condition use Boolean (Player - Player is an enemy of player) to know if unit is enemy and then use Unit_Damage_Target. Target must be the picked unit and unit who damges is casting unit.:smile:
 
Level 11
Joined
Jul 2, 2008
Messages
601
  • HealnDamage
    • Events
      • Unit - A unit starts an effect of ability
    • Conditions
      • (Ability being cast) equal to Healing Ability
    • Actions
      • Set TempLoc = (Position of (Target unit of ability being cast))
      • Custom script: set bj_wantDestroyGroyp = true
      • Unit Group - Pick every unit in (Units within 200.00 of TempLoc matching (((Matching unit) is Building) equal to False and other specific conditions such as (Unit enemy of) etc)) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 50.00 damage of attack type Spell and damage type Common
      • Custom script: call RemoveLocation(udg_TempLoc)
 
Status
Not open for further replies.
Top