Page 2 of 4

Re: Multiple SMS interface

Posted: Fri Apr 15, 2022 4:04 pm
by metaevar
Hi !

There is something i must be doing wrong, i'm working with the example package, i've set up my character and my trigger box and all, but if i click on the button nothing append :/
(ho and my scene for conversation and with the player / trigger box is the same)

here is the Button configuration
Image

and here is the trigger box configuration
Image

am i missing something ?

Re: Multiple SMS interface

Posted: Fri Apr 15, 2022 5:06 pm
by Tony Li
You said you're working with the example package. Does this mean you're using the SMSConversationHandler script included in the example package? If so, use it like in the example scene. You don't need to set up the scene changes and extra Dialogue System Triggers like my post above.

If you're not using the SMSConversationHandler script, then you can use the setup in my post above.

In either case, are there any errors or warnings in the Console window?

Please feel free to send a reproduction project to tony (at) pixelcrushers.com.

Re: Multiple SMS interface

Posted: Fri Apr 15, 2022 6:54 pm
by metaevar
Hoooo okay, i think i've express myself quite badly sorry :/
ok so here is what i have when setup with the base sms example and a bit of tweaking (like trigger a message and all)

if i open the "mom" ui (by clicking on the button) before the player collide with the trigger01 all work fine, but if i open after the first trigger box, sometimes it do nothing and sometimes it open but don't show anything etc... I think it's something to do with the "startSMSConversation" that must be launch before the first trigger ?

Image

Re: Multiple SMS interface

Posted: Fri Apr 15, 2022 8:25 pm
by Tony Li
Hi,

Does the scene have Dialogue System Triggers that are set to OnTriggerEnter? If so, do you need them? The SMS example doesn't use them.

Re: Multiple SMS interface

Posted: Sat Apr 16, 2022 5:09 am
by metaevar
Yes i have them !
I use them to trigger exactly when i want a message (my game is really based on that, i need to be able to choose when a message is sent to the player)

Image

Re: Multiple SMS interface

Posted: Sat Apr 16, 2022 8:57 am
by Tony Li
Hi,

Sorry, I forgot that you're using triggers to send messages to the conversation.

Before the trigger sends the message, the conversation must be playing and on the node that's waiting for the message. Otherwise the trigger will send the message but nothing will be listening for it.

Can you prevent the player from moving into the trigger until the conversation is on that node?

Alternatively, the trigger could send the message and set a variable. This way, if the player enters the trigger before getting to the node, the conversation could also check if the variable has already been set. For example, set up your conversation like this:

triggerConv1.png
triggerConv1.png (30.57 KiB) Viewed 1312 times

Make sure the "You already did it" node is first in the "This is tutorial step 1" node's "Links To:" list. The Dialogue System will check this node's conditions first. If the variable "AlreadyEnteredTrigger" is true, it will use that node and go to step 2. If the variable is not true, it will use the "Enter the trigger" node, which will wait for the sequencer message.

Then set up your Dialogue System Trigger like this:

triggerConv2.png
triggerConv2.png (36.42 KiB) Viewed 1312 times

When the player enters the trigger collider, it will set the variable "AlreadyEnteredTrigger" to true, and it will send the sequencer message. If the conversation is on the "Enter the trigger" node, it will receive the sequencer message and proceed to step 2. If the conversation is not currently on the "Enter the trigger" node, the variable will be set so the conversation can check it later.

Re: Multiple SMS interface

Posted: Thu Apr 21, 2022 5:46 am
by metaevar
Thank you so much ! It work great !
last thing, how can i "resize" the differents part ? Right now they're really small when i'm working on bigger canvas :/ and i can't scale them manually ?

Image

Re: Multiple SMS interface

Posted: Thu Apr 21, 2022 6:50 am
by Tony Li
Hi,

Inspect your dialogue UI's Canvas. Add a Canvas Scaler if it doesn't have one. Set its UI Scale Mode to Scale With Screen Size, and set a reference resolution such as 800 x 600.

Re: Multiple SMS interface

Posted: Thu Apr 21, 2022 10:58 am
by metaevar
And i have no idea why, but i'm having trouble again :/

If i open the "mom" conversation and stay in it, the triggers work fin, everything work fine, BUT if i go back to the contacts selection menu, and then go back to the Mom conversation, it send the next message wether or not it collide with the trigger for it. What i mean is : i have my triggers with the "SequencerMessage(MomTrigger02)" and my dialogue message with the "Continue()@Message(MomTrigger02);" and it work fine when i'm staying in the conversation, but if leave and come back it just send the next message, ignoring the condition "Continue()@Message(MomTrigger02);" :/ any idea why ?

Re: Multiple SMS interface

Posted: Thu Apr 21, 2022 11:48 am
by Tony Li
Hi,

Two possibilities come to mind:

1. Something is triggering the message when you enter the scene, such as some non-player collider in the scene.

2. More likely, it's due to the way SMSDialogueUI restores a conversation's history. When returning to a conversation and repopulating the dialogue UI, it skips all sequences for messages that have already been shown. (If a sequence were to do something like increment a variable value, this prevents it from incorrectly double-incrementing the value.) However, in this case that means it skips the "Continue()@Message(MomTrigger02);" sequence.

If you think #2 is happening, you can confirm by making sure the SMS Dialogue UI's "Don't Repeat Last Sequence" is UNticked, and then commenting out line 475 in SMSDialogueUI.cs:

Code: Select all

// lastEntry.Sequence = "Delay(0.1)";