No command output

I have a pouch in inventory. I can select from the verbs 'open or close'. When I open it, this shows the items in the pouch in the inventory pane. I do not want the command 'Open Pouch' or the response 'You open it' to show on the game page. I know how to stop the command from printing but how do I stop the response from printing?

I need the room to be static without scrolling. The player will only select from a list of options much like a Gamebook. I have the command line hidden for this room.

This is a shop and in order to speed things along I have set it up this way because it is not an area of adventure. Once the player leaves the shop play resumes as a normal text adventure.

Using latest desktop version...


If you make the pouch a container, (and I assume you got that far) Quest adds a tab called Container...
On the container tab, for the pouch..
There is a box for: Message to print when opening (leave blank for default):
You can change what message is printed here... Try " " for nothing.


Thanks DL. It prints out the quotes. Even tried a space. it looks like it works but the screen begins to scroll after several openings. If you try to open when open it prints 'already open'.

I'll dig a little more.


K.V.

I bet I can come up with something, but I'm not completely understanding what you're wanting.

You want the pouch to be able to be opened, but no text to print to the screen at all when this happens during play?


K.V.

How about this?

    <object name="pouch">
      <inherit name="editor_object" />
      <inherit name="container_closed" />
      <feature_container />
      <openmsg type="string"></openmsg>
      <displayverbs type="stringlist">
        <value>Look at</value>
        <value>Take</value>
      </displayverbs>
      <inventoryverbs type="stringlist">
        <value>Look at</value>
        <value>Drop</value>
      </inventoryverbs>
    </object>

This being the important bit: <openmsg type="string"></openmsg>.


Just flip to attribute tab and delete everything in that text field once you've altered the message on the container tab:
image


KV: I think Forgewright said they wanted the pouch to only print "You open it" or similar while not in the shop.

In that case, when entering the shop:

foreach (obj, GetAllChildObjects(game.pov)) {
  if (GetBoolean(obj, "open")) {
    obj.normalopenmsg = obj.openmsg
    obj.openmsg = ""
  }
}

and on leaving:

foreach (obj, GetAllChildObjects(game.pov)) {
  if (GetBoolean(obj, "open")) {
    obj.openmsg = obj.normalopenmsg
  }
}

Alternatively, you could start a new output section and hide it using JS, which would hide all output except the bits you explicitly show.


K.V.

mrangel,

Ah, I see...

That makes sense, and your script(s) would take care of every "open-able" container object with open set to true at once, too.

(KV bookmarks this thread for future reference.)


Even tried a space. it looks like it works but the screen begins to scroll after several openings.

It will probably still print out a blank newline unless the JS method is used; right, mrangel?


(Noting that script only works for objects with the script set to something; it should probably have an check to deal with restoring the default value. It also doesn't deal with cases where the "open" attribute is a script rather than a boolean; as those might print something different anyway)


Thanks guys. I'll check this out after work.


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

Support

Forums