Return The Value Of The Timer Array

Doctor-Peppe

New Member
Reaction score
0
Is it possible, somehow, to get the array value of the expired timer.
More detail:

--------------------------------------------------

there is 1 timer with 2 arrays:
Timer[1]
Timer[2]

Event

Timer[1] expires
Timer[2] expires

action

set TempInteger to The array value of the expired timer

-----------------------------------------------------

Is it possible?
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Code:
Actions
    For each (Integer A) from 1 to 2, do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Remaining time for TimerVar[(Integer A)]) Greater than or equal to 10.00
                Then - Actions
                    Set i = (Integer A)
                Else - Actions
Just...Yes..whatever, you dont have to use remaining time.\ Well ;)
 

Doctor-Peppe

New Member
Reaction score
0
Lol, and if its 1 that expires and 2 is on countdown too, it will be set to [2]
your system is no good at all :)
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I reckon the following script should do it.

Code:
For each (Integer A) from 1 to 12, do (Actions)
    Loop - Actions
        Custom script:   if (GetExpiredTimer() == udg_Timer[bj_forLoopAIndex]) then
        Set tmpInteger = (Integer A)
        Custom script:   endif
 

Doctor-Peppe

New Member
Reaction score
0
Ok, ive found my own, newbie solution, not proud of it, i dont like to work this way, but here it is

Code:
release
    Events
        Time - TimerPlayerJail[1] expires
        Time - TimerPlayerJail[2] expires
        Time - TimerPlayerJail[3] expires
        Time - TimerPlayerJail[5] expires
        Time - TimerPlayerJail[6] expires
        Time - TimerPlayerJail[7] expires
        Time - TimerPlayerJail[8] expires
        Time - TimerPlayerJail[9] expires
        Time - TimerPlayerJail[10] expires
    Conditions
    Actions
        Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 999.00 seconds
        Countdown Timer - Pause (Last started timer)
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Remaining time for TimerPlayerJail[(Integer A)]) Equal to 999.00
                    Then - Actions
                        Set TempInteger = (Integer A)
                    Else - Actions
        Countdown Timer - Destroy TWindowJail[TempInteger]

I still prefer to create a proper solution with jass, tnx andrew, now ill probobly use ur code
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Lol, and if its 1 that expires and 2 is on countdown 2, i will be set to [2]
your system is no good at all
Wtf? No it wont...You just change it... And it is common sense that you dont have the exact condition that i posted, now isnt it? I mean, ofc you dont
have it like this: (Remaining time for TimerVar[(Integer A)]) Greater than or equal to 10.00
I just clicked ok, didnt bother chaning the values and "greater than or equal" to less etc... That was up to you. Well...
 

Doctor-Peppe

New Member
Reaction score
0
ManyTimes havent thought about his trigger at all.
Test it out with multiple running timers
If value is greater than 10 (or whatever, as long as its higher than 0), it will just set the TempInteger to the highest running timer array. BTW, [You Just Change It] statement... Change what? Diapers? Underpants?
Anyway, this issue was already fixed so ...
 
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