How to change NPC description?

yolomeme
30 Oct 2019, 16:32

Sorry, if this question has already been answered. I'm new to quest and coding as a whole.

I'm wondering how to make a script to change the description of an NPC after specific interactions, such as asking them a question, or giving them an item.


GAGE HOLSTON
30 Oct 2019, 16:40

You could have it set so that after performing said interaction, that an attribute for that object or flag gets changed. Then do an IF statement that checks and sees that is set, thus giving an alternate description. You can "Run Script" in the look description and do it through that.


mrangel
30 Oct 2019, 16:51

Yes. There's two main ways to do it. You can either put an if (for scripts) or {if (for text descriptions) in the description, to choose which option you want to display.

Or, in your script you could set the NPC's description to a new value. I think the attribute is called look, so you'd just do:

john.look = "A tall, athletic man, wearing the watch you gave him."

or whatever you want the new description to be.