Question by
tollymon2017 · Dec 23, 2017 at 10:57 PM ·
triggerscript.game
Dialogue Problem
Hey guys, I have a problem that I cannot really resolve. Basically I want to make a dialogue for one of my projects, but after I've put the script and everything in place the object (more exactly the image of Marie Curie) doesn't work at all. I tried to find a resolution but nothing works.
Note that this project is based on this video(I got stuck at 7:20) : https://www.youtube.com/watch?v=_nRzoTzeyxU Picture of the problem: https://imgur.com/a/tggyb Scripts: using System.Collections; using System.Collections.Generic; using UnityEngine;
[System.Serializable]
public class Dialogue {
public string name;
[TextArea(3, 10)]
public string[] sentences;
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour {
private Queue<string> sentences;
void Start()
{
sentences = new Queue<string>();
}
public void StartDialogue (Dialogue dialogue)
{
Debug.Log("Starting convestation with " + dialogue.name);
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class Dialogue {
public string name;
[TextArea(3, 10)]
public string[] sentences;
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DialogueTrigger : MonoBehaviour
{
public Dialogue dialogue;
public void TriggerDialogue()
{
FindObjectOfType<NewBehaviourScript>().StartDialogue(dialogue);
}
}
Can anyone please help me ? Also I'm not that good at scripting and unity in general, please explain me as I'm five. Thank you
Comment