HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Revival Help!

01-15-2007, 07:06 AM#1
Elhyse
I can't make a working trigger on how to revive my heroes!

I made a sort of WoW style of revival. Bring soul to graveyard then resu blah blah...

I made the when I die a soul comes out just fine. My problem is how to revive my hero? I tried bringing the unit to the specified region but up till now it doesn't work.

Trigger :
Trigger:
Revival In Rune Of Revival
Collapse Events
Unit - A unit enters Respawn Truth <gen>
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Hero's Soul
Collapse Actions
Hero - Instantly revive TriggerDeath[(Player number of (Owner of (Triggering unit)))] at (Center of Respawn Truth <gen>), Show revival graphics

Please tell me what to do. I'm still green at map making so the more specific the better. Thanks!
01-15-2007, 10:56 AM#2
Chocobo
I don't see the error. Tryed to debug it? Like showing what unit is in the variable and if the trigger detects if a unit enters?

Else the error is in TriggerDeath, only IF it isn't set to something.
01-15-2007, 11:37 AM#3
zen87
did you save your hero at the TriggerDeath array ?
01-15-2007, 08:47 PM#4
Elhyse
How do I save heroes to the TriggerDeath variable?
01-15-2007, 08:50 PM#5
Freakazoid
Quote:
Originally Posted by Elhyse
How do I save heroes to the TriggerDeath variable?

When a hero dies, check the player number, and save the dieing unit in the variable using the player number integer as an aray!
01-15-2007, 10:06 PM#6
maximilianx
yeah, depending on where each players hero comes from, you need to set the variable at the right time, lets say you get a hero automatically in the begining of the game..do a map initialization trigger with the action set variable-hero[player number]

then use the hero variable as the hero that gets revived, using the player number of the owner of the soul..

i think i suck at describing things.
01-15-2007, 11:29 PM#7
Pyrogasm
Variable Set:
Collapse Events
Unit - A unit dies
Collapse Conditions
((Triggering Unit) is a Hero) equal to True
Collapse Actions
Set TriggerDeath[(Player Number of (Owner of (Triggering Unit)))] = Triggering Unit
That should work; if you need to modify it to fit a hero-selection trigger, then do so.
01-16-2007, 06:03 AM#8
Elhyse
Oh man...it still won't work. I entered the specified region only to find that my Hero Spirit unit removed and not replaced by a fresh and healthy newly reborn hero...I got the trigger Pyrogasm instructed me to do. Problem is I'm not really sure if I did the TriggerDeath variable right...help please!
01-16-2007, 02:23 PM#9
maximilianx
im thinking maybe you accidentally made triggerdeath a unit-type variable instead of just a unit?
01-16-2007, 07:59 PM#10
Elhyse
It looks like this max:

Variable Name: TriggerDeath
Variable Type : Unit(unit)
Array <CHECK!> Size : 1
Initial Value : None

Did I do it Right?
01-16-2007, 11:16 PM#11
Pyrogasm
It should be size 16, not 1 (though I've heard that all values are accessable once it's deemed an 'array'). Maybe that's the problem?

Try uploading all of the triggers relating to this using the "Copy as text" thingey from WE. If you do that, maybe we can find the error with less guesswork.
01-17-2007, 05:43 AM#12
Elhyse
Here's what the triggers are:

If I did it right as instructed to me by Pyrogasm, this will save the dying unit to the TriggerDeath Variable.

Trigger:
Store To Variable
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
Collapse Actions
Set TriggerDeath[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)

This is the trigger when the hero dies.

Trigger:
Death
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
Collapse Actions
Set TriggerDeath[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Unit - Create 1 Hero's Soul for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
Cinematic - Fade out over 2.00 seconds using texture Dream and color (18.00%, 0.00%, 50.00%) with 60.00% transparency

And this is for the Revival of the dead hero.

Trigger:
Revive
Collapse Events
Unit - A unit enters Respawn Truth <gen>
Collapse Conditions
(Unit-type of (Entering unit)) Equal to Hero's Soul
Collapse Actions
Unit - Explode (Triggering unit)
Hero - Instantly revive TriggerDeath[(Player number of (Owner of (Triggering unit)))] at (Center of Respawn Truth <gen>), Hide revival graphics

The Trigger Death Variable :
Variable Name: TriggerDeath
Variable Type : Unit(unit)
Array <CHECK!> Size : 1
Initial Value : None

What did I do wrong?
01-17-2007, 06:42 AM#13
Krysho
You wouldn't happen to have a trigger that removes units that die, would you? If you, by some chance, removed the hero after it died, then there is no way to revive it. Another possibility that comes to mind would be that you might be setting the TriggerDeath variable to something else after the hero dies, which I wouldn't be able to see if that were the case.

In any case, those triggers seem to be in working order. Replicating them works well enough for me.

Quote:
Originally Posted by zergleb
The problem is probably that you don't have enough money to revive the hero, I'm almost certain that the player still has to pay the gold cost, try making a trigger that runs on map init that gives them lots of money, and if you have lots of money try it again.
Reviving heroes through triggers like he's trying to do here doesn't require the player to have any money, at least not by default.
01-17-2007, 06:43 AM#14
zergleb
The problem is probably that you don't have enough money to revive the hero, I'm almost certain that the player still has to pay the gold cost, try making a trigger that runs on map init that gives them lots of money, and if you have lots of money try it again.
01-17-2007, 08:00 AM#15
Elhyse
Not really. Those are all the triggers related to the revival of a hero. Still wondering why it just won't work... it's been 3 days now...i think...T_T