• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Pls help me solve this....

Status
Not open for further replies.
Level 3
Joined
Aug 11, 2004
Messages
45
im trying to make a spell which would kill the unit when it has 20% hp or less but its not killing the unit...what should i do? check this

Events
Unit - A unit Finishes casting an ability

Conditions
(Ability being cast) Equal to Execute

Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of (Target unit of ability being cast)) Less than 20.00
Then - Actions
Player - Add ((Hero level of (Target unit of ability being cast)) x 10) to (Owner of (Casting unit)) Current gold
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 999999.00 damage of attack type Spells and damage type Normal
Else - Actions
Animation - Play (Casting unit)'s Attack slam animation
Do nothing


(PS: casting unit must have the gold reward)
 
Last edited:
Level 10
Joined
Nov 10, 2004
Messages
351
you used Event - A unit stops casting an ability? this event will fire the trigger whenever he stops casting an ability. you should use Event - A unit Starts the effect of an ability.
If you want the killing hero to get gold and xp then replace the Kill unit action with Unit - DamageTarget 99999 damage.
 
Status
Not open for further replies.
Top