Hero Revive Trigger (small bug)

FootysMaXeD

New Member
Reaction score
0
Alright, this is the automated hero revival trigger for my map. It revives heroes in good time and all, but there is just one problem. The display timer that shows each player how long until their hero revives does not work, except for the player red.
This is what is shown: "Hero will revive in: (BLANK)"

I want to fix this before I release my next version of my map, and I don't know JASS so I need your help please!
Trigger:
  • Revive Heroes
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) is in (All players)) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetTriggerUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 3 ) + 27
      • Set AA = (Player group((Owner of (Triggering unit))))
      • Game - Display to AA the text: (Your hero will be revived in: + ((String((27 + ((Hero level of (Triggering unit)) x 3)))) + seconds!))
      • Custom script: call DestroyForce(udg_AA)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remaining time for HeroReviveTimer[(Player number of (Owner of (Triggering unit)))]) Greater than 0.00
        • Then - Actions
          • Set WaitingHeros[(Player number of (Owner of (Triggering unit)))] = ((Player number of (Owner of (Triggering unit))) + 1)
          • Wait ((Remaining time for HeroReviveTimer[(Player number of (Owner of (Triggering unit)))]) + (Real(WaitingHeros[(Player number of (Owner of (Triggering unit)))]))) seconds
          • Set WaitingHeros[(Player number of (Owner of (Triggering unit)))] = ((Player number of (Owner of (Triggering unit))) - 1)
        • Else - Actions
      • Wait until (RevivingNow[(Player number of (Owner of (Triggering unit)))] Equal to False), checking every 1.00 seconds
      • Set RevivingNow[(Player number of (Owner of (Triggering unit)))] = True
      • Custom script: call StartTimerBJ( udg_HeroReviveTimer[GetPlayerId(GetOwningPlayer(OURHERO))], false, I2R(HEROWAIT) )
      • Custom script: call CreateTimerDialogBJ( udg_HeroReviveTimer[GetPlayerId(GetOwningPlayer(OURHERO))], "Hero Revive in:" )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayBJ( false, WINDOW )
      • 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 (All players)) Equal to True
        • Then - Actions
          • Custom script: call ReviveHeroLoc(OURHERO, GetPlayerStartLocationLoc(GetOwningPlayer(OURHERO)), true )
        • Else - Actions
      • Custom script: call DestroyTimerDialog(WINDOW)
      • Set RevivingNow[(Player number of (Owner of (Triggering unit)))] = False
 

DeeVee

New Member
Reaction score
4
If your using a timer window try making a variable array for the timer window for each player and do something at the end like this:

Trigger:
  • Countdown Timer - Show (TIMERVARIABLE(Player Number Owner of triggering unit)) for (Owner of (Triggering unit))


Idk if that will work but it's worth a try
 
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