• 🏆 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!

A simple thing for you.. Help realy needed!

Status
Not open for further replies.

Tan

Tan

Level 3
Joined
Sep 25, 2007
Messages
34
Hello there one of my triggers does not work and I can't see whats wrong with it maybe you could help me? Thanks

When you heal (with holy light) another hero that has 40%HP or less you get 1 gold thats what I want it to do... But it ALWAYS gives 1 gold

  • Melee Initialization
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Percentage life of (Target unit of ability being cast)) Less than or equal to 0.40
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Holy Light
          • ((Casting unit) is A Hero) Equal to True
        • Then - Actions
          • Player - Add 1 to (Owner of (Casting unit)) Current gold
        • Else - Actions
          • Do nothing
 
Level 6
Joined
Jun 23, 2005
Messages
195
Hello there one of my triggers does not work and I can't see whats wrong with it maybe you could help me? Thanks

When you heal (with holy light) another hero that has 40%HP or less you get 1 gold thats what I want it to do... But it ALWAYS gives 1 gold

  • Melee Initialization
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Percentage life of (Target unit of ability being cast)) Less than or equal to 0.40
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Holy Light
          • ((Casting unit) is A Hero) Equal to True
        • Then - Actions
          • Player - Add 1 to (Owner of (Casting unit)) Current gold
        • Else - Actions
          • Do nothing

Im not sure but you might wana try changing event to unit starts effect of ability. Now i think it casts the spell and checks conditions after that.
 
Level 6
Joined
Dec 5, 2007
Messages
184
I'm not sure, too but try this version:
  • Melee Initialization
    • Events
    • Unit - A unit Finishes casting an ability
    • Conditions
    • (Ability being cast) Equal to Holy Light
    • ((Casting unit) is A Hero) Equal to True
    • 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 or equal to 0.40
    • Then - Actions
    • Player - Add 1 to (Owner of (Casting unit)) Current gold
    • Else - Actions
    • Do nothing
 
Status
Not open for further replies.
Top