I know there is a line of code to make objects removable while in-game. That command looks something like this:
clothes.removeable = true
SetVerbs
Is there a similar command to make an object openable/closable and droppable/undroppable while in-game? Note that I do not wish to tick it in the inventory and container tab. I need the command line.
Thanks in advance to anyone who can help me with this.
There's several ways to do this. One way is to give the object the CanBeDropped attribute as a Boolean (True/False). Then, when you drop it, you Run a Script instead of doing the default drop behavior. A possible example, and pardon my psuedocode:
if WhateverObject.CanBeDropped=True:
move WhateverObject to expression:Player.parent
else:
//Nothing happens
But wait! You don't have to make any Attribute. It turns out, there are already these attributes preprogrammed with Quest! For example, 'Can I drop this?' relates to the attribute WhateverObject.drop being True or False. So you can just:
set WhateverObject.drop=False
There's a bunch of different attributes for these things. Open/Closeable, as far as I can tell, is linked to WhateverObject.open and WhateverObject.close respectively.
as already said by 'Io' in his/her post:
http://docs.textadventures.co.uk/quest/attributes/drop.html
OBJECT.drop = false
OBJECT.drop = true
all of the built-in Attributes for Objects:
http://docs.textadventures.co.uk/quest/elements/object.html
Also worth nothing that for the drop
attribute, instead of setting it to true or false you can make it a string (which is displayed instead of the standard drop message), or a script attribute (which is run when the player tries to drop the object)