Page 4 of 5

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 8:17 am
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)

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 8:54 am
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

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 10:07 am
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.

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 1:40 pm
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..


Re: cutscene in start scene

Posted: Wed Jul 27, 2022 2:00 pm
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.

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 2:38 pm
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.

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 2:56 pm
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)

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 4:15 pm
by hrohibil
Thank you Tony :-)

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 5:25 pm
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?

Re: cutscene in start scene

Posted: Wed Jul 27, 2022 5:57 pm
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