2-team hero revival system

cowmenace

New Member
Reaction score
22
I need one just like DotA's. I have searched everywhere, found 3 hero revival systems that looked promising, but each failed. This is my latest attempt

Trigger:
  • Hero Revival Revised
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 4 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is in Team1) Equal to True
        • Then - Actions
          • Custom script: set udg_Point[943] = GetRectCenter(gg_rct_Hero_Spawn_T1)
          • Custom script: call CameraSetupApplyForPlayer( true, gg_cam_Team_1_Store, GetOwningPlayer(GetTriggerUnit()), 0 )
          • Custom script: call ReviveHeroLoc( OURHERO, udg_Point[943], true )
        • Else - Actions
          • Custom script: set udg_Point[943] = GetRectCenter(gg_rct_Hero_Spawn_T2)
          • Custom script: call CameraSetupApplyForPlayer( true, gg_cam_Team_2_Store, GetOwningPlayer(GetTriggerUnit()), 0 )
          • Custom script: call ReviveHeroLoc( OURHERO, udg_Point[943], true )
      • Custom script: call DestroyTimerDialog(WINDOW)
 

PrisonLove

Hard Realist
Reaction score
78
Well, what about it doesn't work?

The timer window? The revival? etc.

By the way change OURHERO from GetDyingUnit() to GetTriggerUnit() and when you refer to Triggering unit later in the script just use OURHERO. The problem may be that you have a hybrid of JASS and GUI, just use JASS the whole way.
 

Scary Nachos

Castro flashing Gang Signs!
Reaction score
45
Just change the conditions around so, the condition is like...

Dying Unit Equals to enemy of Player 1 (Red)

and change the place where that is spawned.

Then for the other one, just do the same thing, just change the condition around and change the location for the revival place.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top