Look under this topic

I note the the parser seems to properly interpret "Look under" when it does this:

> look under cushions

You are sure there's nothing there.

>

I saw a couple of places in the WIKI that mention that you can't do multi word commands, but this seems to imply there is a way to do it, but I have not seen any examples.

I would like to hook into the response and return a more appropriate reply, but I am not seeing how I would do that.
Also, can you actually place an Item under another item?

I.E. place dust bunnies under the sofa so that the interaction would be something like this:

>look under sofa

I see a herd of dust bunnies, and they are pretty upset I disturbed  their afternoon tea.

> take bunnies

I can't seem to get my hand under the sofa, and what's worse, the darn dust bunnies are attacking my nostrils and making me sneeze....

much gratitude for a point in the right direction.

Steve


OOOOKKKAAAYYY: it's amazing what a little sleep can do for you (even if it is not enough). Got it. Reviewing the commands.js file for the fifth time helped. I think I got it.

NM


I saw a couple of places in the WIKI that mention that you can't do multi word commands, but this seems to imply there is a way to do it, but I have not seen any examples.

It is multi-item commands, such as PUT HAT IN BOX, not multi-word, and that only applies to some shortcuts.

I appreciate you have sorted this, but if anyone else is wondering, LOOK UNDER works the same as LOOK; it is built in, and uses the "lookunder" attribute.

Multi-item commands are discussed here:
https://github.com/ThePix/QuestJS/wiki/Creating-Commands


I see, thanks for the clarification! I had misinterpreted this on the page you reference above.

Here is the "Look at" command. The "attName" attribute is set to "examine", so if the player tries to examine an object, the object's "examine" attribute will be used (we cannot use "look at" as it has a space in it).

  new Cmd('Look at', {
    regex:/^(?:x|look at|examine) (.+)$/,
    attName:'examine',
    objects:[
      {scope:parser.isPresent}
    ]
  }),

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums