ChoiceNarrator (of Narrator)

class ChoiceNarrator

Defined in ChoiceTalker.sc.

ChoiceNarrator is a subclass of Narrator that display a series of options for the player to choose. Given a noun/verb/condition tuple, sequence 1 will be the title, and the following sequences will be the options. The number of the option chosen will be the sequence number of that choice minus one.

To put a ChoiceNarrator in choice mode do and specify the noun/verb/condition, do:

(myChoiceNarrator
        normal: FALSE
        curNoun: noun
        curVerb: verb
        curCase: condition
)

Then have it say something, going through the gMessager like usual, and passing the same noun/verb/condition, and 0 for the sequence:

(gMessager say: noun verb condition 0)

Then you can check the whichSelect property:

(switch (myChoiceNarrator whichSelect?)
        (1
                ; Do something
        )
        (2
                ; Do something else
        )
)
class diagram

Properties

Inherited from Narrator:

Property Description
x  
y  
z  
heading  
noun  
case  
modNum  
nsTop  
nsLeft  
nsBottom  
nsRight  
sightAngle  
actions  
onMeCheck  
state  
approachX  
approachY  
approachDist  
_approachVerbs  
yStep  
view  
loop  
cel  
priority  
underBits  
signal  
lsTop  
lsLeft  
lsBottom  
lsRight  
brTop  
brLeft  
brBottom  
brRight  
scaleSignal  
scaleX  
scaleY  
maxScale  
cycleSpeed  
script  
cycler  
timer  
detailLevel  
scaler  
caller  
disposeWhenDone  
ticks  
talkWidth  
keepWindow  
modeless  
font  
cueVal  
initialized  
showTitle  
color  
back  
curVolume  
saveCursor  
name  

Defined in ChoiceNarrator:

Property Description
whichSelect  
normal  
curNoun  
curVerb  
curCase  

Methods

display(theText param2)