Revial Trigger issues

KILLJAW

New Member
Reaction score
0
Ok, I've designed this trigger to respawn a hero once it dies. The countdown timer works exactly how i want it to, but nothing else does. The pan camera and the actual revival itself don't work. Can anyone shed some light on this?

Code:
Hero Respawn
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set TempUnit1 = (Dying unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TempUnit1 is A Hero) Equal to True
            Then - Actions
                Countdown Timer - Start RespawnTime as a One-shot timer that will expire in 30.00 seconds
                Countdown Timer - Create a timer window for RespawnTime with title ((Name of (Owner of TempUnit1)) + 's Revival)
                Wait 24.50 seconds
                Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
                Set TempPoint = (Center of Respawn <gen>)
                Camera - Pan camera for (Owner of TempUnit1) to TempPoint over 5.00 seconds
                Wait 5.50 seconds
                Set TempPoint = (Random point in Respawn <gen>)
                Hero - Instantly revive TempUnit1 at TempPoint, Show revival graphics
                Countdown Timer - Destroy (Last created timer window)
                Custom script:   call RemoveLocation(udg_TempPoint)
            Else - Actions
                Do nothing
        Set TempUnit1 = No unit
        Unit - Add a 0.00 second Generic expiration timer to TempUnit1
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set TempUnit1 = (Dying unit)

Any unit that dies, espectially while this trigger is waiting, will overwrite the variable...

Instead, forget the variable and work with "triggering unit".
Also, the "is a Hero" condition would be better on the trigger.


> Countdown Timer - Destroy (Last created timer window)

This is not necessarily the correct window...

> Set TempUnit1 = No unit

Not needed.

> Unit - Add a 0.00 second Generic expiration timer to TempUnit1

What is this for?


> Do nothing

"Do nothing" does exactly what is says, nothing at all. Just remove it...
 

KILLJAW

New Member
Reaction score
0
Thanks man, I just started working with antileaking so I still have to get the hang of it.
 

WilliamPa

Active Member
Reaction score
51
If i were u, i would try learn them at the last and at the beginning try make triggers just work. Thou i did that when i were me :D:p
 

KILLJAW

New Member
Reaction score
0
I knew I could make it work, I just wanted to be sure that it would work every time.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top