Author Topic: Sais statements  (Read 2140 times)

0 Members and 1 Guest are viewing this topic.

Offline Eynherr

Sais statements
« on: September 02, 2002, 01:42:00 PM »
1. When I use Said statements with three parts (e.g.
Said('use/key/door') , why does this only work if I enter something like "use key with door" ?



Offline lskovlun

Re:Said statements
« Reply #1 on: September 02, 2002, 03:01:42 PM »
The said check is really a two-step process. First, the actual text string (typed by the user) is fed through a kernel call named Parse.
This is a part of the class library, though enhacements like my own right-click function uses it explicitly.
Doing this creates a parse tree for the sentence according to a grammar which is supplied with the game
(vocab.900, I think) but not editable from SCI studio. Each invocation of Said generates additional parse trees for
each said spec, and the two trees are compared. However, if your text string was rejected
in the first phase, all of the calls to Said will also fail. You can verify that this is in
fact what happens by looking at the event stream generated by SCI (a breakpoint in the relevant
handleEvent method will do the trick).

Lars


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.091 seconds with 20 queries.