Hi there,
AC - V1.81.7
Unity - 2021.3.23f1
Hope everyones doing well today.
I hope someone can help me figuring out what I'm doing wrong. And I wasn't sure if I should start a new post or message on a post from almost 4 years ago. Sorry if I got it wrong.
What I need is a way to continue a scene when all conversation topics have been exhausted. Instead of having a "cya later" option to end the conversation.
I've tried using the code Chris kindly supplied on the previous topic.
using UnityEngine;
using AC;
public class FinishConversation : MonoBehaviour
{
public Cutscene cutscene;
void OnEnable () { EventManager.OnEndConversation += OnEndConversation; }
void OnDisable () { EventManager.OnEndConversation -= OnEndConversation; }
void OnEndConversation (Conversation conversation)
{
if (conversation == GetComponent <Conversation>())
{
cutscene.Interact ();
}
}
}
I've attached this to the conversation and set a new cutscene to play.
However, as soon as I click one of the options it instantly jumps to the first topic in the next conversation. Rather than giving the answer and returning to the current conversation.
Disabling this script, the conversation works as normal with the topics being disabled until the list is empty. But I need it to move on automatically to a new cutscene (which starts the next conversation), once all these options have been exhausted.
There is probably something very simple I'm missing here. If anyone can help, it'll be much appreciated.
I'm still getting used to unity and adventure creator, so if there's screenshots or extra information I need to supply please just let me know.
Thanks for taking the time to read.
Kind Regards
Kal
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I think it depends on whether or not you're turning off the options after they're chosen.
If they're still visible after being chosen, yes - you'd need to either rely on variables, or a custom script, to automate the running of a separate ActionList.
Otherwise, if you check Wait until finish? in your Dialogue: Start conversation Action, then the Actions that follow will run once there are no options left to choose from.
Thank you both for your responses.
I am disabling the options after they have been chosen.
I've been using override options in the Dialogue: Start conversation.
I thought that's what I had to do so I could use the action list as a flow chart.
But I see I was limiting my options by doing that.
I'll test out all the advice here.
Thanks very much for getting back to me so quickly.
Just thought I'd come back here and say once again, thank you both for your quick responses and suggestions. I ended up going with Chris' method and it works perfectly thank you so much.
I have another question, regarding being able to skip subtitles by holding down a keyboard key. I believe this has been asked before back in 2019. But i'm unable to get the code to work and is giving me an error. Should I ask on a new topic or re ask on the old 2019 ?
Best post on the old thread - I'm not sure which code you're referring to.