Trigger check

Vylatin

New Member
Reaction score
32
I'm not very good with timers, so I want you to check I did everything right with these triggers below :) This revive system is supposed to revive all dead heroes every 90 seconds of game time.

Trigger:
  • Start Timer
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Countdown Timer - Create a timer window for Revive_Timer with title Ressurection Timer
      • Set ReviveWindow = (Last created timer window)
      • Countdown Timer - Show ReviveWindow
      • Countdown Timer - Start Revive_Timer as a Repeating timer that will expire in 90.00 seconds


Trigger:
  • Add unit to grp
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Unit Group - Add (Dying unit) to Revive_Group


Trigger:
  • Revive Timer
    • Events
      • Time - Revive_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Revive_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is in PlayersRed) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Picked unit) at (Center of Red Revive <gen>), Show revival graphics
              • Unit Group - Remove (Picked unit) from Revive_Group
            • Else - Actions
              • Hero - Instantly revive (Picked unit) at (Center of Blue Revive <gen>), Show revival graphics
              • Unit Group - Remove (Picked unit) from Revive_Group
 

UndeadDragon

Super Moderator
Reaction score
447
I do not see any problems, I think it should work fine.
 

Exide

I am amazingly focused right now!
Reaction score
448
90 seconds is a long time for respawn.

Your triggers should work, but Revive Timer leaks points.
 

Vylatin

New Member
Reaction score
32
90 seconds is maximum revive time. You can revive in 5 seconds, if you die at that time :p
 

UndeadDragon

Super Moderator
Reaction score
447
Exide is right. I forgot about the leaks :eek:
 

Ayanami

칼리
Reaction score
288
Trigger:
  • Revive Timer
    • Events
      • Time - Revive_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Revive_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is in PlayersRed) Equal to True
            • Then - Actions
              • Set TempPoint = (Center of Red Revive <gen>)
              • Hero - Instantly revive (Picked unit) at TempPoint, Show revival graphics
              • Unit Group - Remove (Picked unit) from Revive_Group
            • Else - Actions
              • Set TempPoint = (Center of Blue Revive <gen>)
              • Hero - Instantly revive (Picked unit) at TempPoint, Show revival graphics
              • Unit Group - Remove (Picked unit) from Revive_Group


This should fix the leaks.
 

UndeadDragon

Super Moderator
Reaction score
447
>Glenphir

How would that fix the leaks? You aren't actually removing them, you are just setting the into a variable. After using "Hero - Instantly..." add:

Trigger:
  • Custom Script - call RemoveLocation( udg_TempPoint )
 
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