ChoiceTalker (of Talker)

class ChoiceTalker

Defined in ChoiceTalker.sc.

ChoiceTalker is a subclass of Talker 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 ChoiceTalker in choice mode do:

(myChoiceTalker
        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 (myChoiceTalker whichSelect?)
        (1
                ; Do something
        )
        (2
                ; Do something else
        )
)
class diagram

Properties

Inherited from Talker:

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  
bust  
eyes  
mouth  
viewInPrint  
textX  
textY  
useFrame  
blinkSpeed  
name  

Defined in ChoiceTalker:

Property Description
verb  
case  
whichSelect The sequence number that was selected by the player.
normal If FALSE, the Talker offers options.
curNoun  
curVerb  
curCase  

Methods

show(param1)
say(param1 param2 params)
startText(param1 param2)
display(theText param2)
cycle(param1 param2)