Need help with timeline and sequence
Posted: Sat Nov 25, 2023 1:17 pm
Hi, I am trying to play timeline animation during conversations, but I have difficulty making it work the way I wanted. Here is what I wanted to accomplish in steps:
1) 2 characters are having a conversation. At this point the player can not control the character using IsConversationActive bool check.
2)The dialogue UI is turned off before timeline animation plays.
3) Timeline animation plays. The player can not interrupt the Timeline cutscene until it is done.
4) After the Timeline animation is done, the dialogue UI turns back on if there more dialogue text. The player may or may not be transferred to a different scene depending on the conversation.
5) The player regains control for the player after the conversation ends.
What is the correct sequencer command for this? So far this is what I tried:
I use SetActive(UI name,false); for 2) to turn off the dialogue UI.
I use Timeline(play,Timeline_Name,); for 3).
Then I use SetActive(UI name,true); for 4) to turn on the dialogue UI again.
But this has many problems....
Even though the UI is supposed to turn off, the continue button is not turned off like this, even though the continue button is under the UI menu. Therefore, during the timeline animation, the player can interrupt timeline animation by clicking on the continue button to continue the conversation.
If I add @message(Done); at the end of SetActive(UI name,true), the continue button can be turned off successfully. However the conversation does not end after the animation, therefore the player can not regain control for the character at step 5).
If the timeline cutscene transfers the player to the next scene, then the dialogue UI remains off in the next scene with or without @message(Done). If I start a dialogue in the next scene the game freezes without dialogue UI.
What is the correct way to do this with sequencer command? Any help is appreciated!
1) 2 characters are having a conversation. At this point the player can not control the character using IsConversationActive bool check.
2)The dialogue UI is turned off before timeline animation plays.
3) Timeline animation plays. The player can not interrupt the Timeline cutscene until it is done.
4) After the Timeline animation is done, the dialogue UI turns back on if there more dialogue text. The player may or may not be transferred to a different scene depending on the conversation.
5) The player regains control for the player after the conversation ends.
What is the correct sequencer command for this? So far this is what I tried:
I use SetActive(UI name,false); for 2) to turn off the dialogue UI.
I use Timeline(play,Timeline_Name,); for 3).
Then I use SetActive(UI name,true); for 4) to turn on the dialogue UI again.
But this has many problems....
Even though the UI is supposed to turn off, the continue button is not turned off like this, even though the continue button is under the UI menu. Therefore, during the timeline animation, the player can interrupt timeline animation by clicking on the continue button to continue the conversation.
If I add @message(Done); at the end of SetActive(UI name,true), the continue button can be turned off successfully. However the conversation does not end after the animation, therefore the player can not regain control for the character at step 5).
If the timeline cutscene transfers the player to the next scene, then the dialogue UI remains off in the next scene with or without @message(Done). If I start a dialogue in the next scene the game freezes without dialogue UI.
What is the correct way to do this with sequencer command? Any help is appreciated!