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

Heath reset issue

Status
Not open for further replies.
Level 7
Joined
Jan 11, 2022
Messages
108
What's exactly wrong with this trigger? (probably everything :razz: )

  • HEALTH RESET
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • ((Picked unit) is alive) Equal to True
    • Actions
      • Set TempPoint = (Position of Tremendous Ogre 0272 <gen>)
      • Set ER_AoE = 1000.00
      • Set TempGroup = (Units within ER_AoE of TempPoint matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • Unit - Set life of Tremendous Ogre 0272 <gen> to 100.00%
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 39
Joined
Feb 27, 2007
Messages
5,024
((Picked unit) is alive) Equal to True

Picked Unit only has a value within a Unit Group - Pick loop. That condition always returns false because a null unit can't be classified as alive. When debugging something like this, put debug display messages in various locations to see what is and isn't running.
 
Status
Not open for further replies.
Top