|
Sinema Beginner
Joined: 14 Nov 2001 Posts: 27 Location: USA
|
Posted: Sat Aug 03, 2002 1:05 am
Rotation in an Alias |
I have a small understanding of variables and how they work in an alias.
I was curious if there was a way to make an alias that fires random items in a cycle
Example,
If I set an alias to F1 and I press F1 I'd like it to do the following
Fire Flame
then if I press F1 again
Fire Ice and so on ..
basically shooting preset variables in a certain order and when it reaches the end starts over from the first item.
Is this possible?
Thanks in advance
Sinema |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Aug 03, 2002 3:05 am |
#VAR Cycle {Fire Fire|Fire Ice|Fire Aire|Fire Earth|
#VAR CurrentCycle 1
#KEY F1 {%item(@Cycle,@CurrentCycle);#ADD CurrentCycle 1;#IF (@CurrentCycle > %numitems(@Cycle)) {#VAR CurrentCycle 1)}
Ton Diening |
|
|
|
Sinema Beginner
Joined: 14 Nov 2001 Posts: 27 Location: USA
|
Posted: Sat Aug 03, 2002 10:08 pm |
Hi!
I appreciate the reply but was unable to get the below script to work correctly.
I closed
#VAR Cycle {Fire Fire|Fire Ice|Fire Aire|Fire Earth|
With a } because I thought it was missing one.
And when I did that.. It worked .. sorta.. if I were using Numbers 1-4
1 woudl fire.. skip 2.. 3 would fire.. and then it wouldn't repeat..
Did i copy it in wrong?
#VAR Cycle {Fire Fire|Fire Ice|Fire Aire|Fire Earth|
#VAR CurrentCycle 1
#KEY F1 {%item(@Cycle,@CurrentCycle);#ADD CurrentCycle 1;#IF (@CurrentCycle > %numitems(@Cycle)) {#VAR CurrentCycle 1)}
~
Regards,
Sinema |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Aug 03, 2002 11:21 pm |
#KEY F1 {%item(@Cycle,@CurrentCycle);#ADD CurrentCycle 1;#IF (@CurrentCycle > %numitems(@Cycle)) {#VAR CurrentCycle 1}}
|
|
|
|
Sinema Beginner
Joined: 14 Nov 2001 Posts: 27 Location: USA
|
Posted: Sat Aug 03, 2002 11:55 pm |
Thanks for the reply !
I put the line in ..
~
Regards,
Sinema |
|
|
|
TheLemonHunter Newbie
Joined: 07 Jul 2002 Posts: 5 Location: USA
|
Posted: Sun Aug 04, 2002 12:03 am |
i know this is probable frowned upon, and i am quite sorry, but if someone is reading this topic will they read my topic, it's called HELP, thankyou
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Aug 04, 2002 12:07 am |
You should take out the last | in the variable.
#VAR Cycle {Fire Fire|Fire Ice|Fire Aire|Fire Earth}
LightBulb
Senior Member |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sun Aug 04, 2002 5:24 am |
Wow I must have been baked. Sorry for the syntax mistakes causing confusion earlier!
Ton Diening |
|
|
|
|
|