Hello!
Is it possible to detect in a script if the next dialogue entry will terminate the conversation? I would like to swap the continue button sprite for another when pressing continue will close the dialogue
Thanks!
Change continue button sprite on last dialogue
Change continue button sprite on last dialogue
Currently working on ->Squeakross: Home Squeak Home<- Using Dialogue System Save System and other features.
Previous game made with Dialogue system ->The Spirit and The mouse<-
Previous game made with Dialogue system ->The Spirit and The mouse<-
Re: Change continue button sprite on last dialogue
Hi,
Yes. Check DialogueManager.currentConversationState.hasAnyResponses. For example, you can add a script with an OnEnable() method to the continue button. Something like:
Yes. Check DialogueManager.currentConversationState.hasAnyResponses. For example, you can add a script with an OnEnable() method to the continue button. Something like:
Code: Select all
public Sprite regularSprite;
public Sprite closeDialogueSprite;
void OnEnable()
{
if (DialogueManager.isConversationActive)
{
GetComponent<Image>().sprite = DialogueManager.currentConversationState.hasAnyResponses
? regularSprite
: closeDialogueSprite;
}
}
Re: Change continue button sprite on last dialogue
perfect, thanks a lot!
Currently working on ->Squeakross: Home Squeak Home<- Using Dialogue System Save System and other features.
Previous game made with Dialogue system ->The Spirit and The mouse<-
Previous game made with Dialogue system ->The Spirit and The mouse<-
Re: Change continue button sprite on last dialogue
Happy to help!