unreal.ConversationChoiceReference

class unreal.ConversationChoiceReference(node_reference=[], node_parameters=[])

Bases: unreal.StructBase

The conversation choice reference is the closest thing there is to a link at runtime for a choice. Choices always map to a Task node, which is the NodeReference. However some tasks could potentially dynamically generate several possible choices. In that case they would do so with a unique set of NodeParameters. These would allow one task, say, “Sell N Items”, where it’s one task offering 3 different items for sale, and so it needs to match-up those choices with what the user chooses later. the NodeParameters would contain the dynamic data generated at runtime signifying for the server what to choose.

Luckily the user does not need to guard against cheating clients. Any dynamically generated choice is remembered by the server - so any choice selected dynamically can be verified by the server as one it offered to the user.

C++ Source:

  • Plugin: CommonConversation

  • Module: CommonConversationRuntime

  • File: ConversationTypes.h

Editor Properties: (see get_editor_property/set_editor_property)

  • node_parameters (Array(ConversationNodeParameterPair)): [Read-Write] These are the parameters required by that node to be activated. The same node could potentially handle several dynamic choices it provides, so these parameters are used to uniquely identify the choice when the client responds to the server.

  • node_reference (ConversationNodeHandle): [Read-Write] This is the node that we’re targeting with our choice.

property node_parameters

[Read-Write] These are the parameters required by that node to be activated. The same node could potentially handle several dynamic choices it provides, so these parameters are used to uniquely identify the choice when the client responds to the server.

Type

(Array(ConversationNodeParameterPair))

property node_reference

[Read-Write] This is the node that we’re targeting with our choice.

Type

(ConversationNodeHandle)