Making a hero un-revivable

I am making a map that involves sea battles/sea travel. I want to make a hero that is a flagship, but I’ve ran into a problem. I can make the hero, obviously, but I want to make it so it cannot be revived at the Altar. Instead I wanted to make it so you have to build a new flagship (or you can make multiple) if one is destroyed. I know how to hide the icon on the screen so the player doesn’t have ten-million flagship icons. Please help?

Events
    Unit - A unit Dies
Conditions
    (Unit-type of (Triggering unit)) Equal to Flagship
Actions
    Wait 5.00 seconds
    Unit - Remove (Triggering unit) from the game
    Player - Make Flagship Available for training/construction by Player 1 (Red)

Or:

Events
    Unit - A unit Dies
Conditions
    (Unit-type of (Triggering unit)) Equal to Archmage
Actions
    Wait 5.00 seconds
    Unit - Remove (Triggering unit) from the game
    Set FlagshipLimit = (FlagshipLimit + 1)
    Player - Limit training of Archmage to FlagshipLimit for Player 1 (Red)

FlagshipLimit is an integer whose default value is set to 1.

I put a 5-second Wait action so the death and decay animations are played correctly, but you may choose whatever duration you need.

Is that what you need?

By the way, you should have posted this thread in Custom Games category, not General Discussion. Also, you might want to visit hiveworkshop.com, it’s one of the best WC3 modding site and the community is very helpful there. :slight_smile:

2 Likes

If you dont want to mess with triggers I believe there are much simple solution that you are looking for.

Go Object Editor, select ur hero named flagship
go to
Stats - Hero - Hide Hero Interface Icon - [Set it true instead of False]

Then select ur Altar where the hero is being build.
go to
Techtree - Revives Dead Hero - [Set it false instead of True]