Any Leaks?

Kyzerdrood

New Member
Reaction score
3
Code:
Untitled Trigger 006
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set deadplayer = (Dying unit)
        Set deathregion = (Center of Hero Spawn <gen>)
        Wait 5.00 seconds
        Hero - Instantly revive deadplayer at deathregion, Show revival graphics
        Camera - Pan camera for (Owner of deadplayer) to deathregion over 1.00 seconds
        Custom script:   call RemoveLocation( udg_deathregion)
 

PrisonLove

Hard Realist
Reaction score
78
no it doesnt leak but youll run into problems if you have more than one players hero revivng at the same time so i suggest you use a variable array

deadplayer[(Player number of owner of (dying unit))] = (dying unit)

that way you can have more than one player revive simultaneously.


but with this method you run into an issue if each player has more than one hero
 

vypur85

Hibernate
Reaction score
803
Code:
Untitled Trigger 006
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Wait 5.00 seconds
        [B]Set deathregion = (Center of Hero Spawn <gen>)[/B]
        Hero - Instantly revive [B](Triggering unit)[/B] at deathregion, Show revival graphics
        Camera - Pan camera for (Owner of [B](Triggering unit)[/B]) to deathregion over 1.00 seconds
        Custom script:   call RemoveLocation( udg_deathregion)

The above is a better version.
 

Kyzerdrood

New Member
Reaction score
3
Triggering unit, doesnt it have to be dying unit? and no it will just be one hero, its a rpg.
 

vypur85

Hibernate
Reaction score
803
Both the same. But try to use triggering unit whenever possible. But in your case, using dying unit will produce similar result.

And setting the point is best set after the wait. Even though there is only one hero but still... :rolleyes:

The trigger I provided is universal and MUI.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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