hero respawn issue

wassat676

New Member
Reaction score
3
when hero respawns sometimes it doesnt respawn for the right player, instead it respawns for a computer player (dg, and brown) hers my code see if u can figure it out.

Code:
Hero Respawn
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Game - Display to (All players) the text: A hero has fallen a...
        Wait 30.00 seconds
        Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Equal to (Picked player))
                    Then - Actions
                        Hero - Instantly revive (Dying unit) at (Center of HeavEnd <gen>), Show revival graphics
                        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeavEnd <gen>) with height 0.00 above the terrain over 1.00 seconds
                    Else - Actions
                        Do nothing
        Player Group - Pick every player in (All allies of Player 6 (Orange)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Equal to (Picked player))
                    Then - Actions
                        Hero - Instantly revive (Dying unit) at (Center of HellEnd <gen>), Show revival graphics
                        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeavEnd <gen>) with height 0.00 above the terrain over 1.00 seconds
                    Else - Actions
                        Do nothing
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
Try setting a unit variable equal to (dying unit), use that variable instead of triggering unit and dying unit, and then destroy the variable.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top