[HOWTO] How To: Run a Conversation Only Once
Posted: Thu Dec 12, 2019 8:50 pm
In your dialogue database, define a variable:
This example uses a variable named "TalkedToNPC". In practice, you'll probably want to use a variable name that includes the character name, such as "Adam.Talked". The "." will group variables into submenus for tidier organization in dropdown menus. So you could have variables named "Adam.Talked", "Adam.Insulted", "Bob.Talked", etc.
(Alternatively you can define a custom field in the NPC actor.)
In the conversation, set the variable true:
Then configure your Dialogue System Trigger's Conditions > Lua Conditions to require that the variable is not true yet:
This example uses a variable named "TalkedToNPC". In practice, you'll probably want to use a variable name that includes the character name, such as "Adam.Talked". The "." will group variables into submenus for tidier organization in dropdown menus. So you could have variables named "Adam.Talked", "Adam.Insulted", "Bob.Talked", etc.
(Alternatively you can define a custom field in the NPC actor.)
In the conversation, set the variable true:
Then configure your Dialogue System Trigger's Conditions > Lua Conditions to require that the variable is not true yet: