How do you remove a option from set variables?
kirbymaster1
05 May 2018, 09:30Not sure if I typed that right, but I'm using set variables to make options for people to click in my game, problem is they can click it again afterward which I don't want. So how do I remove it after its use? (linking to another topic that explains this would be fine.)
hegemonkhan
05 May 2018, 12:36not sure if this is what you want...
http://docs.textadventures.co.uk/quest/display_verbs.html
http://docs.textadventures.co.uk/quest/using_lists.html
(not the best example, but my brain isn't working right now lol)
player.parent = room
object_variable = create ("example_object")
object_variable.parent = room
-------
example_object.displayverbs = NewStringList ()
list add (example_object.displayverbs, "take")
example_object.inventoryverbs = NewStringList ()
list add (example_object.inventoryverbs, "drop")
example_object.take => {
example_object.parent = player
if (not ListContains (example_object.inventoryverbs, "drop")) {
list add (example_object.inventoryverbs, "drop")
}
if (ListContains (example_object.displayverbs, "take")) {
list remove (example_object.displayverbs, "take")
}
}
example_object.drop => {
example_object.parent = player.parent
if (ListContains (example_object.inventoryverbs, "drop")) {
list remove (example_object.inventoryverbs, "drop")
}
if (not ListContains (example_object.displayverbs, "take")) {
list add (example_object.displayverbs, "take")
}
}
kirbymaster1
05 May 2018, 22:26this is what I'm using, to make multiple option links.
sorry not that code savvy.

CheeseMyBaby
09 May 2018, 12:26If you're using conversations to set it up you should definitely check out the Pixie's ConvLib.