Bark Trigger Merchant Encounter
Bark Trigger Merchant Encounter
Hey! New member to the pixel crushers forum, wanting to ask about if a conversation can be triggered by a bark if for example characters were saying barks and one triggered a conversation that has been linked through one specific bark for each of the characters and they stop to let the conversation take over without switching scenes. Would love some insight thanks!
Re: Bark Trigger Merchant Encounter
Hi,
Yes, you could do that. Add a Dialogue System Trigger to the character. Set it to OnUse, and configure it to start a conversation. In your bark, set the Sequence field to something like:
SendMessage(OnUse,,speaker) sends the message "OnUse" (without any parameters) to the speaker, which in this case is the barker. The Dialogue System Trigger that's set to OnUse will receive this message and start the conversation.
The @{{end}} part delays the SendMessage() command for a duration specified by the special keyword {{end}}, which is a value determined by the text length and the Dialogue Manager GameObject's Display Settings > Subtitle Settings > Subtitle Chars Per Second. For example, if the text is 120 characters and Subtitle Chars Per Second is 30, the value of {{end}} is 120/30 = 4 seconds.
Yes, you could do that. Add a Dialogue System Trigger to the character. Set it to OnUse, and configure it to start a conversation. In your bark, set the Sequence field to something like:
- Dialogue Text: "Come see my wares!"
- Sequence: SendMessage(OnUse,,speaker)@{{end}}
SendMessage(OnUse,,speaker) sends the message "OnUse" (without any parameters) to the speaker, which in this case is the barker. The Dialogue System Trigger that's set to OnUse will receive this message and start the conversation.
The @{{end}} part delays the SendMessage() command for a duration specified by the special keyword {{end}}, which is a value determined by the text length and the Dialogue Manager GameObject's Display Settings > Subtitle Settings > Subtitle Chars Per Second. For example, if the text is 120 characters and Subtitle Chars Per Second is 30, the value of {{end}} is 120/30 = 4 seconds.
Re: Bark Trigger Merchant Encounter
Would I add the trigger to my merchant that has no component? Or my other characters who would encounter him?
Re: Bark Trigger Merchant Encounter
Add the Dialogue System Trigger to your merchant.
If the merchant is the character that's barking, you can use the sequence I suggested above.
If the merchant is a different character, you'll need to specify that character's name. For example, if the character's GameObject is named "Merchant":
If the merchant is the character that's barking, you can use the sequence I suggested above.
If the merchant is a different character, you'll need to specify that character's name. For example, if the character's GameObject is named "Merchant":
- Dialogue Text: "Hey, merchant. Come over here and show the player your wares!"
- Sequence: SendMessage(OnUse,,Merchant)@{{end}}