Skip to content
Discussion options

You must be logged in to vote

I assume when you say "verb commands with multiple objects", you mean something like show clue to npc, where "clue" and "npc" are the objects, right? If you're not using text input, then it might be easier to simplify the command to show clue and select the NPC in the function that command resolves to. Based on your description, I'd recommend using the respond function, which would fit quite well in this case.

//code.js
new Cmd("Show", {
  regex: /^show (.+)$/,
  objects: [
    { scope: parser.isHeld },
  ],
  defmsg: "{pv:item:'be:true} not something you can do that with.",
})

const CLUE_DICTIONARY = {...TAKEABLE_DICTIONARY};
CLUE_DICTIONARY.afterCreation = function(o) {
  o.verbFunctio…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Woodhouse3D
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Woodhouse3D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants