• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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

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
 
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.
Back
Top