Hide/Show Verb Syntax

Anonynn
12 Jan 2017, 04:29Hi all! I just wanted to know if this is the correct usage for hiding and showing verbs. For example, if a player picks up a weapon and doesn't have it equipped, I would like the equip verb to appear, and once holding the weapon, I want only the unequip verb to appear.
So I was curious if this was the correct format on the "weapon type".
equip.verb.visible=False?
Ugh. That doesn't look right. @_@
The Pixie
12 Jan 2017, 07:37It is not right. Verbs are in a string list attribute, so you are adding and removing words from the list.
list add (weapon.inventoryverbs, "equip")
list remove (weapon.inventoryverbs, "unequip")
Pertex
12 Jan 2017, 14:18don't forget to do this before changing inventoryverbs:
weapon.inventoryverbs = weapon.inventoryverbs
complete code:
weapon.inventoryverbs = weapon.inventoryverbs
list add (weapon.inventoryverbs, "equip")
list remove (weapon.inventoryverbs, "unequip")
same can be done with displayverbs
hegemonkhan
12 Jan 2017, 17:47as has been stated, the displayment of Verbs is controlled by the built-in/special:
'displayverbs' and/or 'inventoryverbs' String List Attributes
http://docs.textadventures.co.uk/quest/asl_requirements.html (very briefly mentioned here, lol)
Pixie has a great guide on using/working-with these (check library and code sample forum board)

Anonynn
12 Jan 2017, 18:20Thanks Pix, Pertex and Hk! ^_^ I appreciate the help!
Anonynn.