• 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 detect dieing unit about a spell?

Status
Not open for further replies.
Level 4
Joined
Apr 5, 2008
Messages
70
I want to detect after the casted unit after death about thomething like Stormhammer. So it should wait until the missile punch the target and than it has to check if the casted unit is dead.
I hope there is any way, that would be nice.
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Condition
<targeted unit of ability being cast> is dead equal to true/false

Has one problem. When the ability is cast the hammer has to fly some time before dealing damage. Your solution will check when the hammer is thrown so the unit might be alive NOW but AFTER the hammer hit not..
I have no real solution just 2 ideas...

1. Damage detection system... (very complicated and I don't know if it will work here)

2. Wait.. say wait for example 3 seconds (the hammer must be able to hit in that time)
And then check with an if
 
Level 6
Joined
Sep 13, 2008
Messages
261
Your second solution will work.
Event
Unit-Starts the effect of an ability
Condition
Ability=Storm hammer
Action
call wait 3 secs
then do action
 
ok than use
  • Events
  • Units startts the effect...
  • Conditions
  • Ability being cast...
  • Actions
  • Wait distance between points (caster) and (target) / 700
    • If
      • <targeted unit of ability being cast> is dead equal to true/false
      • than
        • Kill <targeted unit of ability being cast>
        • else
use /700 if the speed of the missile is 700, but if missile speed is (lets say) 1200, than use /1200
 
Level 4
Joined
Apr 5, 2008
Messages
70
It work realy well thank to all!
But you have to put the casted unit in a variable I think.
Without the variable it don't work at my map.

@Edit: But now I have another question: How to set the threat solved?^^
 
  • Like
Reactions: Rui
Level 13
Joined
Sep 14, 2008
Messages
1,408
  • Events
  • Units startts the effect...
  • Conditions
  • Ability being cast...
  • Actions
  • Wait distance between points (caster) and (target) / 700
    • If
      • <targeted unit of ability being cast> is dead equal to true/false
      • than
        • Kill <targeted unit of ability being cast>
        • else
use /700 if the speed of the missile is 700, but if missile speed is (lets say) 1200, than use /1200

Funny trigger ^^

If the unit is dead -> kill it^^
 
Status
Not open for further replies.
Top