|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Feb 04, 2003 3:03 am
Randomizer trouble |
Ok i got how to randomizer things down
%item( @un, %random( 1, %numitems( @un)))
however im trying to code in a trigger that withh keep up with my changes to combat styles but i am having trouble setting up the alias to properly set it up... this is what i have so far
#ALIAS {un} {
#VAR target %1
#var style {%item( @un, %random( 1, %numitems( @un))) @target}
@style
}
there are 7 possibilities in @un yet whenever this alias goes of it takes the randomizer literally and only puts the random choosen one into @style to repeat over and over, i want @style to randomely spit out from the @un whenever used... am i missing something?
Shalimar |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Tue Feb 04, 2003 3:44 am |
if you want a variable that executes instructions, use the #func command.
#ALIAS {un} {
#VAR target %1
#func style {%item( @un, %random( 1, %numitems( @un))) @target}
@style
}
--------
moon.icebound.net:9000 |
|
|
|
Evangelist Adept
Joined: 10 Oct 2000 Posts: 224 Location: USA
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Feb 04, 2003 4:43 am |
thanks that worked perfectly
Shalimar |
|
|
|
|
|