Author Topic: "Look at <inventory item>"  (Read 1995 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

"Look at <inventory item>"
« 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.


Brass Lantern Prop Competition

Offline troflip

Re: "Look at <inventory item>"
« Reply #1 on: June 18, 2007, 02:04:05 AM »
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:
Code: [Select]
       (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...
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: "Look at <inventory item>"
« Reply #2 on: June 18, 2007, 02:36:45 PM »
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.
Brass Lantern Prop Competition

Offline troflip

Re: "Look at <inventory item>"
« Reply #3 on: June 18, 2007, 03:02:43 PM »
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.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: "Look at <inventory item>"
« Reply #4 on: June 18, 2007, 06:27:51 PM »
Ah, I see. Yes, if anyone's done this please fill us in. :)
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: "Look at <inventory item>"
« Reply #5 on: March 09, 2010, 02:33:41 PM »
This is still an annoying problem if anyone has any ideas to rectify it.
Brass Lantern Prop Competition

Offline Cloudee1

Re: "Look at <inventory item>"
« Reply #6 on: May 03, 2010, 12:00:16 PM »
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.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.1 seconds with 23 queries.