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.
Hi all, I'm still struggling with this flow, after following the tutorial for overiding the dialogue options, so I can deal with the flow in one actionlist.
The "wait until finish" option dissapears when you toggle "overide options" - so I'm wondering whether there's a simple way to check if all options have been exhausted?
I'm imagining a drop down in the Dialogue:Start Coonversation action, that says "when all options are off/exhausted - Skip to INSERT ACTION"
The use case is i need the player to have run through all of the options before we move on? maybe I'm missing something simple?
Are you looking to have the Conversation end automatically, and new Actions run, once all options have been turned off, or once each option has been run least once (but is still visible)?
Sorry for the delay - I hadnt seen a notificatoin on this response.
I suppose, I'm looking for the former, to ensure a player has exhausted all options and they've been turned off.
I think I've arrived at a solution using Variable > run sequence - where i keep returning the player to the conversation (removing the option they just chose) and then count how many times i've sent them back, only revealing a hidden option once they have exhausted the others.
I've run into some confusion here though with the integer value of the run sequence action. (I've posted a seperate discussion on that)
I can see the power of your second suggestoin though now you mention it. Being able to ensure they have selected each option AT LEAST once, but leave those options visible, so they can ask again, if they missed something in the dialogue.
Then as before, reveal a hidden option, ONLY after all other options have been viewed at least once.
This saves creating another conversation item, if that option is simply to say "right I better go then" to finish the conversation.
I hope this rambling makes sense!
Here's a custom Action that will show the last option if all others are either invisible, or have been previously chosen:
Run it before your Dialogue: Start conversation Action to update the option's state before it shows.
To have the other options automatically turn off as they get chosen, you can check Auto-disable when chosen? in their Properties.
To have a single option play automatically, check Auto-play lone option? in the Conversation's Inspector.