The jumpTo expression normally used for jumping to labels within a script cannot jump to variable labels. It is hard wired for efficiency at script compile time. To support less efficient dynamic label jumping, the %jumpTo() function can be used instead. Example:
@options = %array( good, neutral, evil ) %jumpTo( %arrayShuffle( @options )->1 )
label good { cast bless @n cast sanctuary @n
return }
label neutral { cast vigour @n wink @n
return }
label evil { point @n laugh @n cast soul strike @n
return } |