cutscene in start scene

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: cutscene in start scene

Post by Tony Li »

Yes, you can use the SetActive() sequencer command. Example:

Code: Select all

SetActive(SomeGameObject, false);
AnimatorPlayWait(SomeAnimation)->Message(AnimationDone);
SetActive(SomeGameObject, true)@Message(AnimationDone)
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

Thank you Tony this works great...

But...... My conversation don't don't start until the animation is over?
I still want the conversation ongoing while the animation play.

It was just so while animation were running, a specific UI element would be disable.

Can i have my dialoge ongoing same time? Thanks
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: cutscene in start scene

Post by Tony Li »

If you want the conversation and animation to play in parallel, you can start the animation in the first node of the conversation. You don't have to stop it there. You can let it play until some later node in which you play a different animation.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

Hey Tony what do you mean?

See my image below.
I already have the animation start in the first node? Actually in this node tree the only sequencer is this first node. The remaining nodes are just dialogue text.


this is the code:

Code: Select all

{{default}}; Camera(MyCameraAngle); 
SetActive(MobileUI_TopDownMobile_Inventory, false);
AnimatorPlayWait(playerSleep)->Message(AnimationDone);
SetActive(MobileUI_TopDownMobile_Inventory, true)@Message(AnimationDone)
BTW can i have multiple set actives in one code/node? Say i want to disable 3 Game objects same time?

NOTE:
The more you fiddle around with this, the more you find out how much pure gold this killer asset is.. I love it..

User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: cutscene in start scene

Post by Tony Li »

To deactivate things like the Mobile UI, I recommend adding a Dialogue System Events component to the player instead. Configure OnConversationStart() to deactivate the GameObjects and OnConversationEnd() to reactivate them.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

Ok thanks.

But what about my animation issue?
Where or how do i seperat the code in orevioys post if i want both animation and coversation same time.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: cutscene in start scene

Post by Tony Li »

If I understand you correct, set the first node's Sequence to:

Code: Select all

Camera(MyCameraAngle); 
AnimatorPlay(playerSleep)
Set the last node's Sequence to:

Code: Select all

{{default}}; AnimatorPlay(someOtherAnimation)
where someOtherAnimation is the animation to return to after playerSleep. This will play the animation at the start of the last node. To play it when you dismiss the last node:

Code: Select all

{{default}}; 
required AnimatorPlay(someOtherAnimation)@Message(Continued)
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

Thank you Tony :-)
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

I noticed my animation will only play if I check off "pause game during conversation", but if I don that then during conversation my player is flow away as some rigidbody/gravity ish!!

Any idea..

Should I use a event component to freeze player during conversation?
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: cutscene in start scene

Post by hrohibil »

Hi Tony

Sorry to disturb you again.
No rush here. When you have time please see the link youtube I created for you to better see my issue now.

Very briefly.

1:
The animation on play on the NPC dont work unless I have ticked of the "Pause on game" on the trigger object.

2:
During conversation with Wizzard it skips through the last node so we don't get chance to read it? Maybe a delay?

3:
After number 2 issue above as soon as the conversation ends, the player is moving in the direction of where he last entered the trigger,
as if it remembers the last direction i came in from and then paused that. However i can regain control again moving the joystick, but if I don't
he just keeps moving until an obstacle stops him

Everything is more clear in video

Thank you

Post Reply