Page 1 of 1

How to set Bool true in Dialog?

Posted: Sun Feb 14, 2021 11:23 pm
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?

Re: How to set Bool true in Dialog?

Posted: Mon Feb 15, 2021 11:00 am
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()