• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to find an altar which is reviving a specific hero?

Status
Not open for further replies.
Level 5
Joined
May 10, 2024
Messages
60
Hi. How to find an altar which is beginning/finishing/cancelling or reviving a specific hero at the moment if I have more than 1 altar?
 
Level 30
Joined
Sep 26, 2009
Messages
2,616
There are these events:
  • Unit - A unit Begins training a unit
  • Unit - A unit Begins reviving
There are also variants for Cancelling and Finishing training/reviving.

For those events, the (Triggering unit) is the structure doing the training/revival.
To filter which unit is trained or revived, use unit-type comparison conditions:
  • (Trained unit-type) Equal to Footman
  • (Unit-type of (Reviving Hero)) Equal to Footman
 
Level 5
Joined
May 10, 2024
Messages
60
  • Unit - A unit Begins reviving
  • Unit - A unit Finishing reviving
  • Unit - A unit Cancels reviving
All of these returns reviving unit (hero) for TriggeringUnit instead of the structure (altar).
 
Level 30
Joined
Sep 26, 2009
Messages
2,616
You are right, I was mistaken. In case of "Unit - A unit Begins reviving" event it seems the triggering unit is the unit being revived.
Luckily, there is a way to detect this: Use the event
  • Unit - A unit Is issued an order targeting an object
For that event, the (triggering unit) is the altar and (target unit of issued order) is the hero to be revived.
 
Status
Not open for further replies.
Top