How to Revive a hero Unit at a Building

Posts: 1,830
I want to make it so that a hero unit or a specific one, can be remade after death at, say a barracks.
I'd like it so that when this unit dies, it is automatically revived at the barracks.

I know this will take triggers, but since starcraft 2's conditions and triggers are more than 3 times more complicated than starcraft 1's (at least more ridiculous in terms of learning curve) I haven't a single clue how to pull this off, so any trigger explanation would probly be better off being done as if i've never done a trigger-like thing in my life.
Reply Quote
Posts: 129
It doesnt require triggers, but triggers help with the usual accompaniment of announcements and/or timers.

1. For revive at a structure (like a barracks), there are a number of tutorials on
For self-revive, there are 3 options.

1a. Use the Valerian Death prevention method, which essentially keeps the unit from dying. You then apply effects like hiding the unit model and teleporting it to the target spot (in this case, to an area around the barracks), then at the end of the duration, unhide the unit.

2a. Use the built in revive ability. Add the revive ability to the unit, and a behavior which issues an order to the unit upon death to revive. Of course, this method has its drawbacks and you'll need to modify the actor of any units so that when the ability finishes, the actor is recreated.

3. Use a trigger
- Any unit dies
-- If Unit has behavior "X"
---- Revive hero
Edited by ckSynergy on 12/1/2012 9:48 PM PST
Reply Quote
Posts: 1,830
Thanks, though i'm choosing to use 1a, and i don't know how to apply effects to make it hidden, move it and making it unhidden.
Reply Quote
Posts: 129
For that here's the current method I use
Behavior: Heroic (applied directly to the Unit's "Behaviors" field)
Combat Damage Response: 1
Combat Handled (Effect): Heroic Revive Periodic

Effect: Heroic Revive Periodic
Effect - Final: Final Revive Search
Effect Initial: Apply Dead
Periods: 1
Period Duration: 4
Period Effect: None

Effect: Final Revive Search
Searches in X area for target player/allied structure. Search effect: Revive set

Effect: Revive Set:
Teleport to Structure
Remove "Dead" Behavior.

Behavior: "Dead"
Modify: No draw, Disable abilities, disable selection, invulnerable, untargetable, uncommandable, etc.

Then a Trigger controls the periods and such. Honestly, there are so many options using this method, its hard to really describe what needs to be done, but those are the basics.

Right now I'm actually working on testing the built-in revive ability, which so far appears much better/easier to use, but works a bit differently for achieving the same effect (Using the built in, I apply a behavior to the "revive structure" that searches for a dead unit and issues an order to that unit to revive itself at target, which is the casting structure). Still trying to get the duration to increase with levels though...

With the different methods available for revive, I recommend being VERY specific with what you're trying to achieve (what unit, where is revives, how long it takes to revive, how the unit behaves while its reviving, etc etc etc).
Reply Quote
Posts: 1,395
Taintedwisp from Sc2mapster, Check the thread you made there. I have linked the tutorial i used, Its much easier and much smoother then the Valerian way.
Reply Quote
Posts: 1,830
Thanks Ishadow, or Tainted, and thanks ckSynergy :)
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Explain (256 characters max)