• 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] Little problem like always :/

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
I'm making skill that should do some damage and if targeted unit dies when i used spell on him i should get some hp but when i try this i only see special effect when unit dies but i don't get hp whats wrong?
  • Vampire Touch
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Vampire Touch (DreadLord)
    • Actions
      • Set VampireTouchCU = (Casting unit)
      • Set VampireTouchTU = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Vampire Touch (DreadLord) for VampireTouchCU) Equal to 1
        • Then - Actions
          • Wait 0.50 seconds
          • Unit - Cause VampireTouchCU to damage VampireTouchTU, dealing 5000.00 damage of attack type Chaos and damage type Normal
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (VampireTouchTU is dead) Equal to True
            • Then - Actions
              • Unit - Set life of VampireTouchCU to ((Life of VampireTouchCU) + ((Life of VampireTouchTU) x 0.20))
              • Special Effect - Create a special effect attached to the head of VampireTouchCU using Objects\Spawnmodels\Human\HumanBlood\HumanBloodPriest.mdl
              • Set VampireTouchSE = (Last created special effect)
              • Wait 5.00 seconds
              • Special Effect - Destroy VampireTouchSE
            • Else - Actions
        • Else - Actions
Please help
 
Level 9
Joined
May 27, 2006
Messages
498
Cause you used wrong condition. In this case condition "[some unit] is dead" checks only once, when trigger is fired. As the checking comes right after damage dealt, probably game doesn`t have time to mark the unit as dead, cause time between running two lines is extremely short (0.001 sec?). You should make 2 triggers for this spell - one, that initializes when the ability is being cast, and second one that checks if the target unit is dead.
 
Level 7
Joined
Nov 19, 2007
Messages
253
I understand what your saying but why do i see special effect but don't get hp? one of these:
  • Unit - Set life of VampireTouchCU to ((Life of VampireTouchCU) + ((Life of VampireTouchTU) x 0.20))
  • Special Effect - Create a special effect attached to the head of VampireTouchCU using Objects\Spawnmodels\Human\HumanBlood\HumanBloodPriest.mdl
are working and other is not why ?

P.S. heres map try your self
 

Attachments

  • heres map.w3x
    140 KB · Views: 68
Level 7
Joined
Nov 19, 2007
Messages
253
Set VampireTouchCU = (Triggering unit) doesn't work too :/
ah still thanks for your help ill see if anyone else try to help or ill try fix it my self
 
Level 7
Joined
Nov 19, 2007
Messages
253
Hmmm you told me that
Cause you used wrong condition.
maybe there is another condition that could work ?

EDIT: Congrats
EDIT: yay, 100th post... xd

EDIT: I DONE IT !!!!!!!!!!! all I needed to do was
  • Set VampireTouchTHP = ((Max life of VampireTouchTU) x 0.20)
and
  • Unit - Set life of VampireTouchCU to ((Life of VampireTouchCU) + VampireTouchTHP)
Sorry for your wasted time but still thax for trying to help me :wthumbsup:
 
Last edited:
Status
Not open for further replies.
Top