Problem with Trees coming back

tork

New Member
Reaction score
2
i have a tree revival system but its not working right when a tree dies its suppose to come back to life when there no user-owed units near by it works when the trees die but if theres a unit near by then leaves it never comes back to life.
any help will be great!
+rep for anyone whos helps

Trigger:
  • TreeRevielStart
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Destructible-type of (Picked destructible)) Equal to Fall Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
            • Then - Actions
              • Trigger - Add to ReviveTrees <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions


Trigger:
  • ReviveTrees
    • Events
    • Conditions
    • Actions
      • Wait 5.00 seconds
      • Set Temp_Point = (Position of (Dying destructible))
      • Set Temp_Group = (Units within 500.00 of Temp_Point matching (((Owner of (Matching unit)) controller) Equal to User))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group) Equal to 0
        • Then - Actions
          • Destructible - Resurrect (Dying destructible) with (Max life of (Dying destructible)) life and Show birth animation
        • Else - Actions
          • Trigger - Add (This trigger) to the trigger queue (Checking conditions)
      • Custom script: call DestroyGroup (udg_Temp_Group)
      • Custom script: call RemoveLocation (udg_Temp_Point)
 

Shura

New Member
Reaction score
45
You would need to do something along the lines of periodically checking if there are any units within range of the dead tree, and when there isn't revive it.
 

Escura

New Member
Reaction score
3
I'm going to be writing a similar code hopefully but instead of Trees, for wolves.
 
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