Community
SCI Programming => SCI Syntax Help => Topic started by: MusicallyInspired on June 17, 2007, 10:56:59 PM
-
Is there something I'm missing? Does there have to be global said statements made for looking at every inventory object? As it is now the only way I can look at an object is to press TAB and click on the inventory item I have. typing "look at basket" gives me a general parser error message.
-
Well each inventory item has a said statement that identifies it.
There's a saidMe method on the inventory that should return the object which matches the thing the user said.
I tried putting this in handleEvent, but it didn't work:
(var foo)
(if(Said('look>'))
(= foo (send gInv:saidMe))
(if (IsObject(foo))
Print((send foo:description))
)
)
Maybe someone else has an idea... I don't know why it's not working. It should though...
-
I have each inventory item identified in the Main script. Both the descriptions and the words that identify them if you type them. But it's like the game ignores it. If I type "look at basket" in another room it just gives the regular look message as if I typed "look <anyword>". I don't see any saidMe's anywhere, though.
-
Well yeah, what I'm saying is that there is no code that does this automatically - it needs to be written.
However, the inventory class seems to be set up for it, such that at least you wouldn't need to write separate Said statements for every item.
Maybe someone else who was done this will chime in.
-
Ah, I see. Yes, if anyone's done this please fill us in. :)
-
This is still an annoying problem if anyone has any ideas to rectify it.
-
My only suggestion would be to add in the look said statements to the main script. I think the said property in the items instance is strictly for use by the inventory script when it pulls up and references the list of items owned. The only problem with the main script additions, besides heap space, is that a rooms script might override it first.