Where is the problem?

-Brainiac-

New Member
Reaction score
7
Hi there, I got my revival triggers wich include a timer window that shows the time untill your hero revives. After that it will destroy the timer window.

Just that if Player 1 (RED) Dies it works perfectly, if any other player dies the timer window doesn't dissapear and they won't respawn until Player 1 Dies again. After player 1 dies all timer windows are destroyed.

Really weird though:
Trigger:
  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Temp_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Countdown Timer - Start Death_Timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 20.00 seconds
      • Countdown Timer - Create a timer window for Death_Timer[(Player number of (Owner of (Triggering unit)))] with title ((Proper name of (Triggering unit)) + <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
      • Set Death_Window[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)


Trigger:
  • Destroy Timer
    • Events
      • Time - Death_Timer[1] expires
      • Time - Death_Timer[2] expires
      • Time - Death_Timer[3] expires
      • Time - Death_Timer[4] expires
      • Time - Death_Timer[5] expires
      • Time - Death_Timer[6] expires
      • Time - Death_Timer[7] expires
      • Time - Death_Timer[8] expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Death_Timer[(Integer A)]) Less than or equal to 0.00
              • (Temp_Hero[(Integer A)] is alive) Not equal to True
            • Then - Actions
              • Countdown Timer - Pause Death_Timer[(Integer A)]
              • Countdown Timer - Destroy Death_Window[(Integer A)]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Hero[(Integer A)] belongs to an ally of Player 1 (Red)) Equal to True
                • Then - Actions
                  • Set TempPoint = (Center of Heroes North &lt;gen&gt;)
                  • Hero - Instantly revive Temp_Hero[(Integer A)] at TempPoint, Hide revival graphics
                  • Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Hero[(Integer A)] belongs to an ally of Player 5 (Yellow)) Equal to True
                    • Then - Actions
                      • Set TempPoint = (Center of Heroes South &lt;gen&gt;)
                      • Hero - Instantly revive Temp_Hero[(Integer A)] at TempPoint, Hide revival graphics
                      • Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
                      • Custom script: call RemoveLocation(udg_TempPoint)
                    • Else - Actions
            • Else - Actions


Variables:
Death_Timer Timer (Array)
Temp_Hero Unit (Array)
Death_Window Timer Window (Array)

Hope you can find the problem!!:D
EDIT:

(Also if someone knows why the camera is not panned to my respawn point tell me please ^^)

EDIT:2
Found my problem, it was in the variables, set my Death_Timer Array to 1 instead of 8...

If anyone could still answer my question why the camera isn't panned to the location it should be?
 

Happy

Well-Known Member
Reaction score
71
add after setting the variable Temp_Point this:
Trigger:
  • Game - Display to (All players) the text: (String((Center X of (Temp_Point))))

and
Trigger:
  • Game - Display to (All players) the text: (String((Center Y of (Temp_Point))))


this way you can see whether temp point is somewhere or not....


*edit: i see you use (owner of(triggering unit)) but there is no triggering unit ^^ so you have to save owner of triggering unit in your first trigger (i would use a a player array) and use the variable in the second trigger....that should be the problem.
 

-Brainiac-

New Member
Reaction score
7
add after setting the variable Temp_Point this:
Trigger:
  • Game - Display to (All players) the text: (String((Center X of (Temp_Point))))

and
Trigger:
  • Game - Display to (All players) the text: (String((Center Y of (Temp_Point))))


this way you can see whether temp point is somewhere or not....

Don't realy understand, why would I want to see where the temppoint is? If the camera moves there I automatically know.. Or what do you mean with this?


*edit: i see you use (owner of(triggering unit)) but there is no triggering unit ^^ so you have to save owner of triggering unit in your first trigger (i would use a a player array) and use the variable in the second trigger....that should be the problem.

Ok thanks :D
Just going to test what I just made, hold on for a second.

Ok its working (doesn't have to be an Array though)

Thanks +rep! :D
 
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