Login
Remember
IF Answers
Ask a Question

# Quest: Can I hide and unhide a Verb?

0 votes
101 views
asked May 27 in Authoring by JennyKline

Heya!

I'm just wondering - can I temporarily hide a Verb? So that say, I can have the Verbs "Speak To" and "Kiss". Before the player uses "Speak To" they'll not see the verb "Kiss", and after they use "Speak To" it'll show up in the Verb List?

I know I can make "Kiss" invisible, but I'd like to have it show up on the list, for player use.

- quest
- verbs
- verb
- invisible
- hidden

## 2 Answers

+1 vote
answered May 29 by The Pixie (121 points)

All objects have two lists associated with them, one for verbs displayed when the item is in the players inventory, called inventoryverbs, and one for verbs in the room, called displayverbs. All you need to do is add "Kiss" to the displayverbs. If the person to kiss is called Kate, in code it looks like this:

    list add(Kate.displayverbs, "Kiss")

However... you need to make sure your object, Kate, has its own displayverbs list, and is not using the one it got from its type. If you are editing off-line, go to the attributes tab, and check that the displayverbs attribute is black, not grey.

If it is grey (and if you are online, you will be best assuming it is), add a new verb to Kate's list on the Object tab, and then delete it again.

See also:

http://forum.textadventures.co.uk/viewtopic.php?f=18&t=5023

0 votes
answered May 27 by hegemonkhan (161 points)
edited May 27 by hegemonkhan

here's the links:

http://docs.textadventures.co.uk/quest/asl_requirements.html

"On the "Places and Objects" list, the buttons that appear for an item are defined by the displayverbs attribute, which is a list of strings. On the "Inventory" list, the buttons are specified by the inventoryverbs attribute (exerpt from the link above)."

and here's the guide to working with them:

http://docs.textadventures.co.uk/quest/guides/display_verbs.html (pretty sure it's probably Pixie's, but if not, my apologizes for it, credit goes to whoever it is, if it's not Pixie's guide)

you may also want to see how lists work:

http://docs.textadventures.co.uk/quest/guides/using_lists.html

if you need any more help, let us know, and we'll help you directly. (You probably will, if you don't have some experience with coding, but I'm just too tired~lazy at the moment to give more direct help, lol)

conceptually what you're doing:

adding~removing the verb from the verb list~s ( 'displayverbs' and~or 'inventoryverbs' ).

you initially don't want the 'kiss' verb in your 'displayverbs'~'inventoryverbs' list (as you want it to be hidden), but then within your 'speak~speak to' Verb, you'll want it to add your 'kiss' Verb into the 'displayverbs' and~or the 'inventoryverbs' list (to thus reveal~show your 'kiss' verb now).

this is quite a bit advanced stuff, if you're new to quest and especially to coding. this is not something that beginners should be trying to learn~do, as they'll have a hard time with it.

## Related questions

- Quest - why does the # disappear when I add a verb?
- How do you hide a verb and then make it visible under certain conditions?
- How do I make verbs synonymous for only certain objects in Quest 5.6.1?
- How can I run a command via script? [Quest]
- Changing the subject of a verb

...