 |
Delrayne Beginner
Joined: 01 Feb 2008 Posts: 16
|
Posted: Tue Jun 10, 2008 11:06 pm
Using %random in an alias |
Ok, so I have an alias like so:
#alias {throwdarts}
#var rtoxin1 %item( @toxins1, %random( 7, 0))
#var rtoxin2 %item( @toxins2, %random( 7, 0))
dart select @rtoxin1
dart backup @rtoxin2
twinshot @target
Ok, so @toxins1 and @toxins2 both have a list of 7 different toxins I can throw darts with. I'm wanting it to choose randomly from those to lists and place it in the @rtoxin1 and @rtoxin2 variable so I can select said toxin then shoot. Thanks ahead for any help. |
|
|
 |
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Jun 11, 2008 1:32 pm |
Change the 7, 0 to 1, 7 instead. If you only use the rtoxins within this alias you can skip setting a variable and go direct.
#alias {throwdarts} {
dart select %item(@toxins1, %random(1, 7))
dart backup %item(@toxins2, %random(1, 7))
twinshot @target} |
|
_________________ Taz :) |
|
|
 |
Delrayne Beginner
Joined: 01 Feb 2008 Posts: 16
|
Posted: Thu Jun 12, 2008 2:53 am |
Thanks for help, works like a charm now. I originally had it working off the random alone without the extra variables, but I couldn't get it to work and went that route. I new something was up, when I had it coded right. Never thought to switch the numbers though.
|
|
|
 |
|
|
|
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
|
|