Does anybody know how to make this work?
In a routine like AskFor it has a noun and a second, with the second being parsed as a topic. But is it possible to change the second to the noun and have it parsed?
The grammar would look like:
Verb 'ask'
* 'for' scope=TopicScope -> AskForTopic;
[ AskForTopicSub;
<<AskCreatureFor caveTroll>>;
];
Then in the caveTroll’s BEFORE:
AskCreatureFor:
if (self.switched) {
self.switched = false;
second = noun;
}
switch (second) {
t_grub:
"~Mine!~";
}
Obviously this doesn’t work, but that’s the idea I’m trying to figure out.
I’ve also tried reading NextWord() and setting that to the second, but it doesn’t like that either.
Any ideas? Thanks - D