|
aliensurfer Beginner
Joined: 11 Apr 2005 Posts: 17
|
Posted: Thu Jun 09, 2005 1:44 pm
Alarms in a loop |
Hi,
Firstly, Thanks to Deathdealer for this script, which is 99% on the way to what I need to do.
The script gets the Unique ID's of a list of bombs, puts them into an array and lets me use one alias to set a timer on them all.
I would like to add an alarm into the loop to pause slightly in bewteen each timer set.
For example
set timer on bomb one
wait 1/2 second
set timer on bomb two
wait 1/2 second
set timer on bomb three
etc
DD pointed me in the direction of a post he had used before about this, but I still cant get it to work. Any help would be appreciated,
Script is:
#CLASS {BOMBS}
#ALIAS bang {
#LOOP 1,%numitems( @bombs) {timer bomb%item( @bombs, %i) %1}
#VARIABLE bombs {}
}
#VARIABLE bombs {}
#TRIGGER {^~"bomb(%d)~"} {#ADDITEM bombs {%1}}
#CLASS 0
I have tried putting both an #wa 500 and #alarm 500 in the loop line invarious places but no luck.
any ideas?
Cheers,
AS |
|
|
|
Maelstrom Apprentice
Joined: 10 Feb 2005 Posts: 158
|
Posted: Thu Jun 09, 2005 4:47 pm |
Code: |
#CLASS {BOMBS}
#ALIAS bang {
#SEND {timer %item(@bombs,1) %1}
#LOOP 2,%numitems( @bombs) {#ALARM +%i*0.5 {#SEND timer %item(@bombs,%i) %1}}
#VARIABLE bombs {}
}
#VARIABLE bombs {}
#TRIGGER {^~"bomb(%d)~"} {#ADDITEM bombs {%1}}
#CLASS 0
|
|
|
|
|
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu Jun 09, 2005 4:55 pm |
You could Change:
Quote: |
#LOOP 1,%numitems( @bombs) {timer bomb%item( @bombs, %i) %1} |
to
Code: |
#FORALL @bombs {timer bomb%i %1;#WAIT 500} |
|
|
|
|
aliensurfer Beginner
Joined: 11 Apr 2005 Posts: 17
|
Posted: Thu Jun 09, 2005 7:44 pm |
Thanks guys.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|