Hero revival not working

Hildagarn

Member
Reaction score
20
Code:
Actions
 A unit dies
 Conditions
Dying unit Equal to hero is True
 Actions
Wait 30 seconds
Revive Dying unit at center of (my region)
this isn't working...
 

slayer

New Member
Reaction score
2
This works:

Resurrection P1
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set ReviveLOC = (Center of Revive <gen>)
Hero - Instantly revive (Dying unit) at ReviveLOC, Show revival graphics
Set ReviveLOC = (Position of (Reviving Hero))
Camera - Pan camera for (Owner of (Reviving Hero)) to ReviveLOC over 0.60 seconds
Custom script: call RemoveLocation(udg_ReviveLOC)
Selection - Select (Reviving Hero) for (Owner of (Reviving Hero))
 

FireBladesX

Eating my wings!
Reaction score
123
But, he wants a wait, you see, hmm? Use "Triggering Unit" instead of "Dying Unit", and it should work.
 

slayer

New Member
Reaction score
2
But, he wants a wait, you see, hmm? Use "Triggering Unit" instead of "Dying Unit", and it should work.

You mean like this? Yes your way works as well..

Resurrection P1
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set ReviveLOC = (Center of Revive <gen>)
Hero - Instantly revive (Triggering unit) at ReviveLOC, Show revival graphics
Set ReviveLOC = (Position of (Reviving Hero))
Camera - Pan camera for (Owner of (Reviving Hero)) to ReviveLOC over 0.60 seconds
Custom script: call RemoveLocation(udg_ReviveLOC)
Selection - Select (Reviving Hero) for (Owner of (Reviving Hero))
 

FireBladesX

Eating my wings!
Reaction score
123
But if you wait 30 seconds before reviving the unit, then it's required to have "Triggering Unit" as the event response, I believe.
 

PrisonLove

Hard Realist
Reaction score
78
Code:
Hero Revive

    Events
        Unit - A unit Dies

    Conditions
        ((Triggering unit) is A Hero) Equal to True

    Actions
        Set ReviveLOC = (Center of Revive <gen>)
[B][COLOR="Blue"]        Wait - 30 seconds[/COLOR][/B]
        Hero - Instantly revive (Triggering unit) at ReviveLOC, Show revival graphics
        Set ReviveLOC = (Position of (Reviving Hero))
        Camera - Pan camera for (Owner of (Reviving Hero)) to ReviveLOC over 0.60 seconds
        Custom script: call RemoveLocation(udg_ReviveLOC) 
        Selection - Select (Reviving Hero) for (Owner of (Reviving Hero))

the blue is what he wanted. also im not sure if you would use reviving hero or triggering unit
 

slayer

New Member
Reaction score
2
Believe me, I've tested, and no, you cannot use triggering unit. Then the hero wont spawn :p


But this works:
Resurrection
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set ReviveLOC = (Center of Revive <gen>)
Wait 10.00 seconds
Hero - Instantly revive (Dying unit) at ReviveLOC, Show revival graphics
Set ReviveLOC = (Position of (Reviving Hero))
Camera - Pan camera for (Owner of (Reviving Hero)) to ReviveLOC over 0.60 seconds
Custom script: call RemoveLocation(udg_ReviveLOC)
Selection - Select (Reviving Hero) for (Owner of (Reviving Hero))
 

vypur85

Hibernate
Reaction score
803
Code:
Resurrection
 Events
   Unit - A unit Dies
 Conditions
   ((Dying unit) is A Hero) Equal to True
 Actions
   [B]Wait 10.00 seconds[/B]
   Set ReviveLOC = (Center of Revive <gen>)
   Hero - Instantly revive (Dying unit) at ReviveLOC, Show revival graphics
   Camera - Pan camera for (Owner of ([B]Dying unit[/B])) to ReviveLOC over 0.60 seconds
   Custom script: call RemoveLocation(udg_ReviveLOC)
   Selection - Select ([B]Dying unit[/B]) for (Owner of ([B]Dying unit[/B]))
> slayer
Your trigger works but it can potentially leak. Put the wait before the setting the point.


> no, you cannot use triggering unit. Then the hero wont spawn
Have you really tried?


> Hildagarn
You should probably show the actualy trigger instead of a typed one. Your trigger seems fine to me. Not sure why would it not work.
 

FireBladesX

Eating my wings!
Reaction score
123
I'm pretty sure that it doesn't work because "dying unit" gets overwritten if another unit dies during the wait period. I must have forgotten to mention that earlier.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
I'm pretty sure that it doesn't work because "dying unit" gets overwritten if another unit dies during the wait period. I must have forgotten to mention that earlier.

hehe i tried using that, it works multiple times xD
 

cleeezzz

The Undead Ranger.
Reaction score
268
dying unit does not get overwritten, its just lost when the corpse is gone (something like that)

try triggering unit

offtopic, another wet panda icon? xd
 

Azylaminaz

Vox Populi
Reaction score
91
>>Your trigger works but it can potentially leak. Put the wait before the setting the point.
The variable is set after the leak, meaning no, it won't leak.

>>I'm pretty sure that it doesn't work because "dying unit" gets overwritten if another unit dies during the wait period. I must have forgotten to mention that earlier.
Not true, it's basically the same as triggering unit.


To copy/paste GUI triggers as text, right click the trigger title (above the Event section) and select Copy As Text. This shows us an exacty copy of what you see.
 

Dakho

()[o__o]()
Reaction score
75
It's because 30 seconds is too long and the corpse will be gone and the dying unit won't apply.

Store the Dying unit in a variable first is all you have to do, then Revive him using the Variable.
 

Sevion

The DIY Ninja
Reaction score
413
It's because 30 seconds is too long and the corpse will be gone and the dying unit won't apply.

Store the Dying unit in a variable first is all you have to do, then Revive him using the Variable.

I did that, but I realized I would overwrite the variable so I made it array. But I have to run through the array with a loop then revive but if it ran every 30 seconds, It could revive a hero early. So I was going to make a counting thing to make it not glitch.
 

cleeezzz

The Undead Ranger.
Reaction score
268
then use triggering unit, it doesn't rely on a corpse...

>>The variable is set after the leak, meaning no, it won't leak.
vypur was referring to the trigger that slayer had, which does leak.

in fact, it leaks a lot, its not just possible it will leak, it will leak. the same variable is set twice without removing, and Center of (Loc) and Position of (unit) leaks, Not including leaks if you run the trigger between the 30 sec wait which will overwrite the 1st variable and leak more.

removing it ONCE at the end of the trigger will not solve the overwrite.
 

vypur85

Hibernate
Reaction score
803
> the corpse will be gone and the dying unit won't apply
I think a hero corpse is slightly different. It doesn't get removed (that's why you can see the icon at the top left of the screen, meaning it still exist).

> Store the Dying unit in a variable first is all you have to do
Dying unit or better still, Triggering unit, are MUI, so storing into variable would be quite wasteful because it makes them non-MUI. Even if you store it in a variable, if the unit gets removed, it will still be useless, 'Triggering unit' no longer exist.

> Cleeez
Yeah... Still wet panda :p. Cute...
 

R@i_no_Wyrm

New Member
Reaction score
43
as long as the unit is a hero and u store it in array and a countdown integer it will not leak. reduce the integer every 1s, when it reached 0 revive at point and remove the point for later use.
 
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