Timer expires[array]

RedOrb

You can change this now in User CP.
Reaction score
14
Hi all,

Is there a way to use this event and refer to players 1-10? And then in the conditions/actions refer to the triggering array element?
Say if I wanted to detect when any player's timer had expired, and upon expiring, create a new unit for that player at a center of region, would that be possible? Or would I need to create a separate event (and trigger!) for each player?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You can use timer arrays, but there's no way to detect which one's expired if you put them all into one trigger's events. A separate trigger will be needed for each player.
 

RedOrb

You can change this now in User CP.
Reaction score
14
You can use timer arrays, but there's no way to detect which one's expired if you put them all into one trigger's events. A separate trigger will be needed for each player.
Ok Thanks Kaerf ;]
 

maxou

You can change this now in User CP.
Reaction score
15
Trigger:
  • Trigger Timers initialization
    • Events
    • Melee map initialization
    • Conditions
    • Actions
    • Create a hashtable
    • Set Timers_Hashtable = Last created hashtable
    • customscript: call DestroyTrigger(GetTriggeringTrigger())


Trigger:
  • Trigger Start timers
    • Events
    • Insert the event(s) you want here
    • Conditions
    • Insert the condition(s) you want here
    • Actions
    • X is the player number of the triggering player, or owner of casting unit or etc... It's also the array Id of Timer[]
    • Start Timer[X] as once for 30.00
    • Save X as 1 of Key(Timer[X]) in Timers_Hashtable





Trigger:
  • Trigger Timers expire
    • Events
    • Timer[1] expires
    • Timer[2] expires
    • Timer[3] expires
    • ... And the others ...
    • Conditions
    • Actions
    • Set Timer_Over = Load 1 of Key(Expiring Timer) in Timers_Hashtable


I hope you understood ;/ I did it by mind, it's maybe not the right spelling of the actions
 

vypur85

Hibernate
Reaction score
803
> Set Timer_Over = Load 1 of Key(Expiring Timer) in Timers_Hashtable

Awesome find. Never knew there is such thing as 'Expiring Timer' in GUI until now. I guess Timers are relatively GUI friendly now. :)
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Oh. Never knew that.
In that case, you could put them all into one trigger and add conditions to it, checking for the expired timer.
 

maxou

You can change this now in User CP.
Reaction score
15
But you couldn't ask for the 'array of expring timer', so by using this you can :D
Com'on guys, tricky. Be tricky! ;)
 
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