• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Hero Trigger help please?

Status
Not open for further replies.
Level 9
Joined
Feb 16, 2011
Messages
595
  • Training trigger Copy
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Training 1 <gen> contains (Reviving Hero)) Equal to True
          • (Training 2 <gen> contains (Reviving Hero)) Equal to True
    • Actions
      • Unit - Move (Reviving Hero) instantly to (Rally-Point of (Triggering unit) as a point)
The Idea is to make the Altar Revive the hero at it's rally point but it can't seem to recognize the Altar only the hero.
 
Level 9
Joined
Feb 16, 2011
Messages
595
The training Condition was meant to make sure it only affected part of the map not the entire map, but the problem is Triggering unit is meant to be the altar(s) in the region not the hero when it's just a normal unit this trigger works fine, imagine an altar designating it's Rally point(Flag that pops up from buildings) And any heroes revived from said Altar will teleport to that point.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
It looks like you will have to keep track of which building is starting to revive the hero.
None of the event responses actually refers to the building.

Attacked Unit, Reviving Hero and Triggering Unit all refer to the hero.
None of the others does something helpfull.

So you have to keep track of the building that revive a hero.
When that happens you put those buildings into a group and you check the distance between the revived hero and all structures inside that group when the hero is revived.
If you are lucky, you can find out which building trained him.
 
Level 6
Joined
Aug 31, 2014
Messages
137
hoping this will help

not sure if this is what your looking for but..... here you go

[trigger=spell]Untitled Trigger 001
Events
Unit - A unit Finishes reviving
Conditions
((Unit-type of (Triggering unit)) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to TRAININGONE
Then - Actions
Set point = (Rally-Point of DUMMY2 as a point)
-------- spefic unit training --------
Set TRAININGONE = No unit-type
-------- spefic unit training --------
Set hero = (Reviving Hero)
Unit - Move hero instantly to point
Set hero = No unit
Custom script: call RemoveLocation (udg_point)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to TRAININGTWO
Then - Actions
Set point = (Rally-Point of Target as a point)
-------- spefic unit training --------
Set TRAININGONE = No unit-type
-------- spefic unit training --------
Set hero = (Reviving Hero)
Unit - Move hero instantly to point
Set hero = No unit
Custom script: call RemoveLocation (udg_point)
Else - Actions
[/trigger]


hopefully someone will be able to help more thou happy triggering

also this trigger wont work its just an idea on how it might
 
Last edited:
Status
Not open for further replies.
Top