• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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