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

Trigger help

Status
Not open for further replies.
Level 3
Joined
Dec 1, 2008
Messages
27
Im looking for a trigger that determines the health of a target so that i can have a move that if they are below a certain HP value it deals more damage for example

Event
Spell is cast

Condition
Spell being cast = Spell

Action
Set variable Caster=Casting unit
Set variable Target=Target of casted spell
(Heres where i want it)
If target less than X hp deal 250 ect ect....

Thx for the help
 
Level 11
Joined
May 31, 2008
Messages
698
You can set the damage according to the ability by using variables. Instead of saying "dealing 250.00 damage" do addition and say add variable, prolly integer or maybe real (i get those confused sumtimes :p), that is set to level of ability x 15 +100 or sumthin like that

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Life of (Triggering unit)) Less than or equal to 500.00
    • Then - Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Normal
    • Else - Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 250.00 damage of attack type Spells and damage type Normal
 
Level 2
Joined
Nov 17, 2008
Messages
35
You can set the damage according to the ability by using variables. Instead of saying "dealing 250.00 damage" do addition and say add variable, prolly integer or maybe real (i get those confused sumtimes :p), that is set to level of ability x 15 +100 or sumthin like that

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Life of (Target unit of ability being cast)) Less than or equal to 500.00
    • Then - Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 500.00 damage of attack type Spells and damage type Normal
    • Else - Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 250.00 damage of attack type Spells and damage type Normal

fixed some bugs.
 
Status
Not open for further replies.
Top