Animation/Video while answering

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DayKnight
Posts: 1
Joined: Fri Nov 25, 2022 10:47 am

Animation/Video while answering

Post by DayKnight »

Hello there :)

Is there a build in feature which allows me to play videos, if player picks one answer, play this video if another play this. What I want to do is,
1. play a cutscene,
2. (Pause) (Wait for player input)
3. If player picked 1 (Play cutscene 1) else (Play cutscene 2)
4. Play next cutscene etc.

I know there is a way to do character animation while talking to an NPC, but is there an option for cutscenes like this?
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animation/Video while answering

Post by Tony Li »

Hi,

The Dialogue System uses sequences to handle stuff like this. Each dialogue entry node waits until its Sequence is done. (Or the Dialogue Manager's Default Sequence if the node's Sequence field is blank.)

For example, if your "cutscene" is an animation, you can set a node's Sequence to something like:

Code: Select all

AnimatorPlayWait(my_cutscene_animation)
or even:

Code: Select all

AnimatorPlayWait(dance)->Message(Danced);
AnimatorPlayWait(bow)@Message(Danced)->Message(Bowed);
required AnimatorPlay(idle)@Message(Bowed)
If your cutscene is a timeline:

Code: Select all

Timeline(my_timeline_gameobject)
There isn't a built-in command for video, but you can write custom sequencer commands. See the Cutscene Sequence Tutorials.
Post Reply