Respawn Hero

AlExAlExAlEx

Member
Reaction score
7
Need help in making a trigger..that respawns a hero after 120 seconds..i've got
Trigger:
  • Respawn Hero
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
    • Actions
      • If (((Triggering unit) is A Hero) Equal to True) then do

And at "then do" ..what sould i put ?
 

Carl-Fredrik

New Member
Reaction score
51
Need help in making a trigger..that respawns a hero after 120 seconds..i've got

Trigger:
  • Respawn Hero
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
    • Actions
      • If (((Unit-type of (Triggering unit)) is A Hero) Equal to True) then do
    • And at "then do" ..what sould i put ?
Trigger:
  • (This is the easy solution but it's only MPI, not MUI)
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_3">
    • <li class="lastopen"><span class="default">Revive Hero</span>
    • <ul>
    • <li class="open"><span class="events">Events</span>
    • <ul>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 1 (Red) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 2 (Blue) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 3 (Teal) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 4 (Purple) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 5 (Yellow) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 6 (Orange) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 7 (Green) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 8 (Pink) Dies</span></li>
    • <li class="tree"><span class="unit">Unit - A unit owned by Player 9 (Gray) Dies</span></li>
    • <li class="lasttree"><span class="unit">Unit - A unit owned by Player 10 (Light Blue) Dies</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="conditions">Conditions</span>
    • <ul>
    • <li class="lasttree"><span class="default">((Triggering unit) is A Hero) Equal to True</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="set">Set Hero[(Player number of (Owner of (Triggering unit)))] = (Dying unit)</span></li>
    • <li class="tree"><span class="wait">Wait 120.00 seconds</span></li>
    • <li class="lasttree"><span class="hero">Hero - Instantly revive Hero[(Player number of (Owner of (Triggering unit)))] at (Center of (Playable map area)), Show revival graphics</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </div></div>
 

Carl-Fredrik

New Member
Reaction score
51
now i can't find
Trigger:
  • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Dying unit)
:D

OK...

The action is called "Set Variable".

Since you haven't made a variable yet I guess, click Edit Variables, then make a new one (The green icon), name it Hero, make it a Unit variable, check the array box and then fill in 10 next to the array box.

Now you'll be able to set your variable.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait 120.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Hide revival graphics

Change the point to whatever you need it to be.

both (Dieing unit) and (Triggering unit) are MUI, and heroes won't get removed/recycled like regular units will.
 

Carl-Fredrik

New Member
Reaction score
51
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait 120.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Hide revival graphics

Change the point to whatever you need it to be.

both (Dieing unit) and (Triggering unit) are MUI, and heroes won't get removed/recycled like regular units will.

They are? I didn't know, sorry for making things complicated :p

Is there some kind of list where you can check which ones of these are MUI-capable and which of them aren't?
 

Kikac_NNGK

Well-Known Member
Reaction score
33
Trigger:
  • Trigger
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Dying unit)
      • Set Point = (Position of Hero[(Player number of (Owner of (Triggering unit)))])
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 120.00 seconds
      • Trigger - Turn on Trigger Revive &lt;gen&gt;


Trigger:
  • Trigger Revive
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Hero - Instantly revive Hero[(Player number of (Owner of (Triggering unit)))] at Point, Show revival graphics
      • Trigger - Turn off (This trigger)


Note: Trigger Revive is Initally off


EDIT: o_O o_O Wow i was "afk" for a while and this conversation has become....:eek:
Trigger:
  • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Dying unit)

I forgot. Dying Unit should be Triggering Unit
 

AlExAlExAlEx

Member
Reaction score
7
I'l trust DartFett :D
Trigger:
  • Respawn Hero
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players matching (((Triggering unit) is A Hero) Equal to True)) the text: Your hero has died ...
      • Wait 120.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of Region 018 &lt;gen&gt;), Hide revival graphics

Going to test.
 

simonake

New Member
Reaction score
72
Trigger:
  • For each (IntegerA) 1 to 8 do (Actions)
    • loop -
      • If (Conditions), then do (Actions) else do (Actions)
        • If -
          • Owner of (Triggering unit) Equal to (Player (IntegerA))
        • Then -
          • Set Respawn[IntegerA] = (Triggering unit)
          • Wait 2.00 seconds
          • Hero - Revive Respawn[IntegerA] instantly to (center of (playable map area))
        • Else -
 

gbubic2

Active Member
Reaction score
0
If your hero is dying non stop use RemoveLocation in Custom script to avoid memory leak.

Trigger:
  • Player 1 Dies
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set PointGVY = (Random point in Graveyard &lt;gen&gt;)
      • Hero - Instantly revive (Dying unit) at PointGVY, Show revival graphics
      • Custom script: call RemoveLocation(udg_PointGVY)
      • Selection - Select (Dying unit) for (Owner of (Dying unit))
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
They are? I didn't know, sorry for making things complicated :p

Is there some kind of list where you can check which ones of these are MUI-capable and which of them aren't?

(Triggering unit) and (Dying unit) are the only two that I know of. The spell-related ones are often mistaken to be MUI, but they are not. (You should use (Triggering unit) instead of (Casting unit), as it is a common problem with dysfunctional GUI spells).

Awaiting original poster to confirm that the trigger works. :p
 

Scauldingpon

New Member
Reaction score
1
it really doesnt need to be that creative. for a basic hero revival,

Herodeath
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Wait 120.00 seconds
Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Hide revival graphics

make sure you specify where you want them to revive at. its easy and simple!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top