How can I access dialogue entry field value from the dialogue choice buttons?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
EntertainmentForge
Posts: 23
Joined: Sun Nov 29, 2020 8:50 pm

How can I access dialogue entry field value from the dialogue choice buttons?

Post by EntertainmentForge »

Hey Tony,

How can I access dialogue entry field value from the dialogue choice buttons?

I used this to access it from the node that is currently active like this:

Code: Select all

Field.LookupValue(subtitle.dialogueEntry.fields, "Sign")
But I need to access this "Sign" field from the choice buttons.

I made made class StandardUIResponseButtonCustom that extends from StandardUIResponseButton.
And I made CustomStart() function. Here I'd like to access it's node to get the field value.

Here's a screenshot with more info: https://prnt.sc/wayq8m

Thanks!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I access dialogue entry field value from the dialogue choice buttons?

Post by Tony Li »

Hi,

The response button will have a property called response. Check response.destinationEntry:

Code: Select all

Field.LookupValue(response.destinationEntry.fields, "Sign");
Post Reply