Hello.
We are in the process of implementing skip and auto play based on what was previously discussed on the forum.
<Skip through dialogue on keypress (like Renpy)>
https://www.pixelcrushers.com/phpbb/vie ... 400#p40400
I'm having trouble because when I hold down the ctrl button and exit auto play, and then talk to the player again, it automatically enters auto play.
What kind of processing should I add to cancel the auto play state when the conversation ends?
I am a graphic user and am not good at programming. I can make a simple game, so I'm building it while looking at sample scenes.
I would be happy if you could show me a sample.
Autoplay function question
Re: Autoplay function question
Hi,
Make a new script named something like MyConversationControl containing this:
This script is called a subclass because it extends the functionality of the original ConversationControl class. When a conversation ends, it turns off auto play.
Then replace your ConversationControl component with this subclass. You can do it in-place so you don't lost inspector assignments. See here.
Make a new script named something like MyConversationControl containing this:
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class MyConversationControl : ConversationControl
{
public override void OnConversationEnd(Transform actor)
{
base.OnConversationEnd(actor);
DialogueManager.displaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Always;
}
}
Then replace your ConversationControl component with this subclass. You can do it in-place so you don't lost inspector assignments. See here.
-
- Posts: 36
- Joined: Sun Jul 14, 2024 2:35 am
Re: Autoplay function question
Hello.
After rewriting the script you provided, I was able to confirm that the auto play no longer continued to the next conversation.
However, although auto play no longer works, the part where the continue button setting for the dialogue system controller component was set to "Always" changed to "Never" when the conversation ended by holding down the ctrl key.
I was able to fix that part using the script, so there was no problem.
Thank you for teaching me.
After rewriting the script you provided, I was able to confirm that the auto play no longer continued to the next conversation.
However, although auto play no longer works, the part where the continue button setting for the dialogue system controller component was set to "Always" changed to "Never" when the conversation ended by holding down the ctrl key.
I was able to fix that part using the script, so there was no problem.
Thank you for teaching me.
Re: Autoplay function question
Hi,
I'm glad you got it working!
I'm glad you got it working!