|
ezgoezit Newbie
Joined: 21 Jul 2006 Posts: 2
|
Posted: Fri Jul 21, 2006 7:42 pm
Random (but not back to back) alias question |
I am having difficulty creating an alias that calls up a random fighting technique without repeating the last one called. I have made an alias that calls up the random technique, but I am having trouble figuring out how to make sure the same technique is not called up back to back. Does anyone have any advice for this issue? My current alias follows:
#var ComboList{axekick|backfist|charge|crescentkick|disarm|elbow|firekick|flamingpunch|frostpunch|gouge|grapple|hammerfist|headbutt|hurl|icekick|jumpkick|kick|knee|knifehand|lightningkick|lunge|palmstrike|phantompunch|punch|ridgehand|rip|roundhouse|shadowkick|shockpunch|slidekick|snapkick|spearfinger|spinkick|stomp|sweep|thrustkick|trip}
%item( @ComboList, %random( 1, %numwords( @ComboList, "|"))) "%-1" |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Jul 21, 2006 10:23 pm |
#VAR LastSelect {@Selected}
#WHILE {@Selected=@LastSelect) {#VAR Selected {%iitem(@ComboList,%random(1,%numitems(@ComboList)))}}
#EXECUTE {@Selected %-1}
That should about handle it. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
ezgoezit Newbie
Joined: 21 Jul 2006 Posts: 2
|
Posted: Sat Jul 22, 2006 12:36 am |
Thanks, I appreciate it. For some reason, I am still getting the same technique twice in a row sometimes and I am wondering if it is because I am doing sets of
15 of my alias that calls the random stance. |
|
|
|
|
|