Unit Group - How Access Hero that is Dead?

Bird

Ultra Cool Member
Reaction score
29
So here is a truncated version of a Spell I have. Basically, this Hero gains bonus Critical Strike (among other things) when it becomes Night, and loses the bonus when it becomes Day.
This works fine, except, when he is Dead. If it is 6 or 18 o'clock when he is Dead, this trigger does not detect him, and does not Add/Remove the bonuses... I proved this by inserting the Game - Display action, which returns "1" when he is Alive, and does nothing when he is Dead.

What is the best solution to this? How can I modify a Hero that is Dead? If I stored the Hero in a variable, and specifically accessed him that way (as opposed to a Unit Group) would that work?

Here is the 6 o'clock trigger... (where he loses the Bonus)
Trigger:
  • Nightfall 6
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Set Tmp_UG = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Watchman (26 26 28)) and ((Level of Nocturn (Hero) for (Matching unit)) Greater than 0)))
      • Unit Group - Pick every unit in Tmp_UG and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: ((String((Number of units in Tmp_UG))) + units in group.)
          • Unit - Set level of 01 - Critical Strike (Universal) for (Picked unit) to ((Level of 01 - Critical Strike (Universal) for (Picked unit)) - (Level of Nocturn (Hero) for (Picked unit)))
      • Custom script: call DestroyGroup (udg_Tmp_UG)
 

Bird

Ultra Cool Member
Reaction score
29
Well I simply stored the Hero in a Variable when he is Sold at an Altar and... it works.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top