Changing conversation field in dialogue entry script

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
vire7777
Posts: 6
Joined: Thu Dec 15, 2022 4:51 am

Changing conversation field in dialogue entry script

Post by vire7777 »

Hello

I missed something here
In the box SCRIPT of one of my dialogue entry (for example when the actor is speaking), i know how to change a variable, a quest, an item, etc... field
For this i write for example :
Variable["myboolean"] = false

But i don t know how to reach and modify a Conversation field (for example let s say i would love to change the description of this Conversation during the dialogue entry)
I thought it would be the same
Conversation["myboolean"] = false

But it doesn t work
Can someone know ?
Thanks
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing conversation field in dialogue entry script

Post by Tony Li »

Hi,

At runtime, some conversation data is stored in Lua. This includes the Description field. Conversations are stored by ID. For example, if your conversation ID is 9, then you can set conversation 9's Description like this in a Script field:

Code: Select all

Conversation[0].Description = "This is the new description."
In C#, you can use DialogueLua.GetConversationField() and SetConversationField().
Post Reply