- Joined
- Aug 29, 2004
- Messages
- 159
Hey guys
I have a trigger which by needs has to refer to multiple expiring timers. The timers are set as an array (72), and when the timer expires, i need to know the array number of which timer is expiring to determine where to send the unit subsequently created.
The only way that i can find to do this is like so:
For some reason, this seems to be creating a million other ships (well, 72), implying that it is just running the trigger for each integer A, and seeing that each timer has 0 seconds remaining. Every timer has been created and set to having 1E1000 seconds remaining (1000 zeros people!) so theres no problem there that i can see. Anyone know whats wrong?
Hmm world edit really needs a way to reference array values... and a function to reference timers... and a timer to reference the Training unit (unit doing the training). hmm.
Any help much appreciated,
=][= Bort
I have a trigger which by needs has to refer to multiple expiring timers. The timers are set as an array (72), and when the timer expires, i need to know the array number of which timer is expiring to determine where to send the unit subsequently created.
The only way that i can find to do this is like so:
Code:
For each (Integer A) from 1 to 72, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Remaining time for SpawnTimer[(Integer A)]) Equal to 0.00
Then - Actions
Set UnitNumber = (Integer A)
Else - Actions
Do nothing
For some reason, this seems to be creating a million other ships (well, 72), implying that it is just running the trigger for each integer A, and seeing that each timer has 0 seconds remaining. Every timer has been created and set to having 1E1000 seconds remaining (1000 zeros people!) so theres no problem there that i can see. Anyone know whats wrong?
Hmm world edit really needs a way to reference array values... and a function to reference timers... and a timer to reference the Training unit (unit doing the training). hmm.
Any help much appreciated,
=][= Bort