convert array number from event to integer?

mothmann

New Member
Reaction score
1
i have a trigger that adds an event to another trigger

Code:
Add Trigger
    Events
        Unit - A unit Is loaded into a transport
    Conditions
    Actions
        Countdown Timer - Start SleepTimer[(Player number of (Owner of (Loading unit)))] as a One-shot timer that will expire in 10.00 seconds
        Trigger - Add to Trigger 1 <gen> the event (Time - SleepTimer[(Player number of (Owner of (Loading unit)))] expires)

what i need is a way to call the array number of the SleepTimer in Trigger 1. i've been looking for a while and gave up so i came here. is it possible?


another quick question. when searching what do you place between words to search for phrases?


Edit- heres what i came up with after pondering on it for a while

Code:
House Sleep
    Events
        Unit - A unit Is loaded into a transport
    Conditions
    Actions
        Countdown Timer - Start SleepTimer[(Player number of (Owner of (Loading unit)))] as a One-shot timer that will expire in (10.00 + ((Real((Player number of (Owner of (Loading unit))))) / 100.00)) seconds
        Trigger - Add to Untitled Trigger 001 <gen> the event (Time - SleepTimer[(Player number of (Owner of (Loading unit)))] expires)
basically. add hundredths of seconds to the initail timer based on the player number.
Code:
Trigger 1
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Initial time for SleepTimer[(Integer A)]) Equal to (Initial time for (Expiring timer))
                    Then - Actions
                    Else - Actions
then use the initial time to do a Real/Countdown Timer/Intial Time check between the sleeptimer(integer a) and the exipiring timer. this will let me use integer a as the player number number in my then actions.

thats the best i've came up with so far considering there isn't just a Countdown Timer comparison in w.e. (which is stupid cause they have everything else)

if someone comes up with anything better than this i'd be happy to know. because this would give player 1 a slight .11 second advantage over player 12.
 
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