Call Conversation By Code
Posted: Wed Oct 02, 2024 11:10 am
Hello!
I need a bit of help as this has to do with the Dialogue System interacting with other pieces of game code.
What I need essentially is just the right syntax, I believe, to set up the database, the UI that's gonna be used (Remember, I have two different ones) AND what conversation to start.
Hope this is fairly easy
(Pseudo code)
I need a bit of help as this has to do with the Dialogue System interacting with other pieces of game code.
What I need essentially is just the right syntax, I believe, to set up the database, the UI that's gonna be used (Remember, I have two different ones) AND what conversation to start.
Hope this is fairly easy
(Pseudo code)
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class PhonecallTrigger : MonoBehaviour
{
public GameObject Player;
public UI TheUIToUse;
public Conversation PhoneCallToCall;
// Start is called before the first frame update
public void OnTriggerEnter(Collider other)
{
//Bunch of code here about disabling other systems etc, etc
DialogueManager.UI = TheUiToUse;
PhoneCallToCall.start();
}