How to set Bool true in Dialog?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Hereder
Posts: 76
Joined: Mon Dec 21, 2020 2:53 am

How to set Bool true in Dialog?

Post by Hereder »

Is it possible to set a bool true in another GameObject via the Dialog?
I tried to Add a script inside "Events" an call wifeAppears();

Code: Select all


    public bool wifeComing;

    public void wifeAppears()
    {
        Debug.Log("Check Clementine");
        wifeComing= true;
    }

So, once the conversations reached a point, a wife will appear on the scene.

Thanks in advnace!

EDIT: Also, is there a way to "Skip" conversation? In case the player accidentally talk to an NPC again and want to skip the entire conversation?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to set Bool true in Dialog?

Post by Tony Li »

Hi,

There are several ways to set a bool true.

You can hook up a Scene Event (video tutorial).

Or use the SendMessage() sequencer command to call the wifeAppears method on a GameObject named "SomeGameObjectName":
  • Sequence: SendMessage(wifeAppears,,SomeGameObjectName)
(Or write a custom sequencer command - video tutorial)

Or register wifeAppears() with Lua and call it in the Script field: (video tutorial)
  • Script: wifeAppears()
Post Reply