Page 1 of 1
Starting New Conversation From Sequence
Posted: Thu Jul 13, 2023 8:57 pm
by Itilos
I'm currently looking to set up a Sequence like this (pseudocode):
FadeIn();
[Wait for fade to complete]
StartConversation();
My Trigger object looks like this:
- Screenshot 2023-07-13 205305.png (48.63 KiB) Viewed 867 times
My issue is, the Fade occurs, but immediately, the conversation Action starts.
I have two questions:
- How do I delay an action to wait on the one above?
- Is it possible to trigger a conversation from a sequence? Say I have triggers A and B, can A run a sequence that start's B's conversation? I was looking through the docs and couldn't figure out how to do this.
Thanks!
Re: Starting New Conversation From Sequence
Posted: Thu Jul 13, 2023 11:23 pm
by Tony Li
Hi,
There are a few ways you can do this. Here's one way:
- chainedTriggers.png (57.61 KiB) Viewed 864 times
When you interact (use) this GameObject, the first Dialogue System Trigger plays a sequence containing "Fade(out, 3)".
The second Dialogue System Trigger fires when a sequence on this GameObject ends. It plays a sequence to fade in and starts the conversation.
Re: Starting New Conversation From Sequence
Posted: Fri Jul 14, 2023 10:47 am
by Itilos
Thanks! This works fine.
As per my second question - is it possible for a Dialogue Trigger to start a Conversation on a different object?
AKA is there any way for a sequence or something to call a different GameObject's DialogueTrigger StartConversation Action, or do they need to be on the same object?
Re: Starting New Conversation From Sequence
Posted: Fri Jul 14, 2023 11:58 am
by Tony Li
Hi,
It's possible. Set the other GameObject's Dialogue System Trigger to OnUse. Then you'll use the SendMessage() sequencer command to trigger it. There are two ways to specify the other GameObject:
1. If you're playing the sequence in a Dialogue System Trigger's Action > Play Sequence, assign the other GameObject as the Sequence Speaker. Then use this sequencer command: SendMessage(OnUse)
2. If you can't specify the sequence speaker, give the other GameObject a unique name. For example, say it's named Foo. Then use this command: SendMessage(OnUse, , Foo)
Re: Starting New Conversation From Sequence
Posted: Fri Jul 14, 2023 8:40 pm
by Itilos
Thank you! This is very helpful.
Re: Starting New Conversation From Sequence
Posted: Fri Jul 14, 2023 9:01 pm
by Tony Li
Glad to help!
Re: Starting New Conversation From Sequence
Posted: Fri Jul 14, 2023 11:07 pm
by Itilos
One other thing that just came up along same lines -
Is there an easy way to pass in a child of a gameobject for the SetEnabled() sequence command?
Ie lets say a gameobject looks like this
Player(speaker)
|- Sprite (child of Player, contains component A)
I want to SetEnabled() component A.
Am I able to do something like SetEnabled(A, true, speaker.Sprite) ?
Re: Starting New Conversation From Sequence
Posted: Sat Jul 15, 2023 10:04 am
by Tony Li
Hi,
Unfortunately no. If you know the GameObject is named exactly "Player", you could do this:
Code: Select all
SetEnabled(A, true, Player/Sprite)
If you know the speaker is the conversation actor and that its GameObject name is exactly the same as the actor's Display Name field in your dialogue database, you could do this:
Code: Select all
SetEnabled(A, true, [var=Actor]/Sprite)
(If you haven't ticked the actor's Use Display Name field, the Display Name will be the value of its Name field.)
If that doesn't meet your needs, you could write a custom sequencer command.
(See Part 6 of the
Cutscene Sequence Tutorials.)
Re: Starting New Conversation From Sequence
Posted: Sun Jul 16, 2023 9:45 pm
by Itilos
This is helpful! Thank you!
Re: Starting New Conversation From Sequence
Posted: Sun Jul 16, 2023 10:00 pm
by Tony Li
Glad to help!