So I have an Object that has its verbs changed multiple times during my game. I know mostly how this works, but I would like if someone could confirm the following for me:
If I use
name_of_object.displayverbs = name_of_object.displayverbs
Then it removes all the added displayverbs that weren't originally in the list at the beginning of the game, right?
So if my object started with only "Look at" and throughout the game gained a "Bend" "Shatter" "Break" etc. displayverb it would return to just "Look at", right?
Or would I still need to manually remove the other displayverbs from the list?
No; that line just makes the displayverbs editable; it won't change it at all.
You might be able to use:
name_of_object.displayverbs = null
This deletes the attribute, which causes it to go back to its default value. That is, the list of displayverbs that all objects have by default (equal to
Split("Look at;Take")), plus any that are added by types such as "npc", "wearable", or "lockable". It won't recreate any that you added to that particular object in the editor.
If you're returning it to just "Look at", the easiest way would be:
name_of_object.displayverbs = Split("Look at")
(note that you can use
Split like that to get a list with one item in it. You do this because
displayverbs has to be a list)