Jim,
Did you read down to the next example, “Verbs with one object plus a topic,” containing a dictionary – The topic handling more complexly responds with a string, which is stowed away in a table indexed to the topic. This brings us back to Consultables…
–Frankly, I’m not at all certain why the following doesn’t work, and as you seem further along in understanding ResolvedTopic, I wonder if you’d comment:
[code]DefineTAction(ThinkAbout)
objInScope( obj ) { return true; }
;
VerbRule(ThinkAbout)
((‘think’ (‘about’ | )) | ‘ponder’ | ‘contemplate’) singleDobj
: ThinkAboutAction
verbPhrase = ‘think/thinking (about what)’
;
modify Thing
thoughtMsg = 'You <>consider<>ponder<>think about<> ’ + theName + ', but
<>nothing comes to mind<>no useful ideas come to you<>your mind remains obstinately
blank<>the subject doesn’t lead to any fresh insights<>. ’
dobjFor(ThinkAbout) {
preCond = []
verify() { logical; }
action() {
say (thoughtMsg);
}
}
;
modify Topic
thoughtMsg = 'You <>consider<>ponder<>think about<> ’ + theName + ', but
<>nothing comes to mind<>no useful ideas come to you<>your mind remains obstinately
blank<>the subject doesn’t lead to any fresh insights<>. ’
dobjFor(ThinkAbout) {
preCond = []
verify() { logical; }
action() {
say (thoughtMsg);
}
}
;
//////////////////////////////////////////////////////////////////////////////////////
meaningOfLifeTopic: Topic ‘meaning of life’
thoughtMsg = 'How much time`ve you got? ’
;[/code]
The output:
think about guy
You ponder the guy, but your mind remains obstinately blank.
think about suit
You consider the suit of armor, but no useful ideas come to you.
think about meaning of life
–This crashes the game. Which is oddly pleasing to me, but not the intended outcome. I get a nil object reference.
Conrad.
edited to add – the dictionary demo code, which I asked about – does not run. There’s something wrong with it beyond my ability to untangle.