HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger to revive a hero at an altar

09-22-2003, 11:09 PM#1
Panto
Greets.

Let's pretend that I have a computer-controlled player who has one building, his altar, and one hero, which can be any of four choices. Why wouldn't this trigger succeed in reviving his hero when it dies?
Code:
Resurrect Hero
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Dying unit)) controller) Equal to Computer
        ((Dying unit) is A Hero) Equal to True
    Actions
        Wait 10.00 game-time seconds
        Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)) matching (((Picked unit) is A structure) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to train/upgrade to a Demon Hunter
                Unit - Order (Picked unit) to train/upgrade to a Priestess of the Moon
                Unit - Order (Picked unit) to train/upgrade to a Keeper of the Grove
                Unit - Order (Picked unit) to train/upgrade to a Warden
It's not an issue of the computer lacking resources. Can you think of what might be wrong?
09-23-2003, 01:51 AM#2
LunarCrisis
are you sure the order to train a hero is the same one as to revive one?
09-23-2003, 02:05 AM#3
noobelite
im betting its not....

but i dont know if there is a way to order them to specifically "revive" a hero, sry
09-23-2003, 02:13 AM#4
Dragon
Train does not equal revive.
09-23-2003, 02:22 AM#5
UltimateJim
i would say make some complicated math thinger (level of dying hero x 100) and subtract that much gold then select all units owned by player (enemy) and revive @ pos of altar
09-23-2003, 04:28 AM#6
Panto
Unfortunately, there isn't a "revive" order available.

UltimateJim's method would probably work, but it seems like a messy workaround. Are there no other known alternatives?
09-23-2003, 02:18 PM#7
Vexorian
Unit - Issue Order targetting a unit

Code:
Events -
Unit - Hero becomes revivable

Conditions
((Owner of (Triggering unit)) controller) Equal to Computer

Actions
Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) matching ((([b]matching unit[/b]) is A structure) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to revive (Triggering unit)
09-23-2003, 08:03 PM#8
Panto
Code:
Unit - Order (Picked unit) to revive (Triggering unit)
Where are you getting that from? I can't find a "revive" command anywhere.

EDIT: And yes, I fixed the problem with "matching unit". But, "Upgrade/Train to" still isn't working to revive it.
09-23-2003, 10:32 PM#9
Vexorian
You have to use Issue order [/b]targetting a unit[b]