• 🏆 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] trigger problem

Status
Not open for further replies.
Level 15
Joined
Jun 14, 2009
Messages
494
Unidad - A unit Muere
(Killing unit) Igual a myunit
If ((Level of Soul eater for (Triggering unit)) Igual a 1) then do (Unidad - Set life of (Killing unit) to ((Vida of (Killing unit)) + ((Vida máx. of (Dying unit)) x 0.05))%) else do (Do nothing)


If ((Level of Soul eater for (Triggering unit)) Igual a 3) then do (Unidad - Set life of (Killing unit) to ((Vida of (Killing unit)) + ((Vida máx. of (Dying unit)) x 0.15))%) else do (Do nothing)
If ((Level of Soul eater for (Triggering unit)) Igual a 2) then do (Unidad - Set life of (Killing unit) to ((Vida of (Killing unit)) + ((Vida máx. of (Dying unit)) x 0.10))%) else do (Do nothing)
What's the problem of this trigger it sembles to not working i used other variables like triggering unit and casting but not anybody knows why?
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Change it to:

  • Events
    • Unit - A Unit Dies
  • Conditions
    • (Killing Unit) Equal to MyUnit
  • Actions
    • Unit - Set the life of Killing Unit to Life of Killing Unit + ((Max life of (Dying Unit)) x (0.05 x (Level of MyAbility for (Killing Unit)))
Much easier to read.(And more efficient)

See if this works.
 
Status
Not open for further replies.
Top