Custom cutscene

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Custom cutscene

Post by hrohibil »

Hi Toni

During a cutscene I want to enable a game object.
Else when not in the cutscene or conversation this GO should be disabled

What is easy way on this?
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom cutscene

Post by Tony Li »

Please see my other questions in your other thread about cutscenes. You can use the SetActive() sequencer command to activate and deactivate GameObjects in Dialogue System cutscene sequences.
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Custom cutscene

Post by hrohibil »

I tired adding this to my already camera and animation
SetActive(tag=bobbyBook, true

My gameobject is called "bobbyBook".

But now after i add that last line, the camera or animation dont work and neither does the gameobject set to true...
-------------------------------------------
Camera(CameraSHOPMANBOOK,, 4);
{{default}};
AnimatorPlayWait(shopmanhand)->Message(Done);
AnimatorPlayWait(Convo_11_Listening_Loop_IP)@Message(Done)
SetActive(tag=bobbyBook, true)
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Custom cutscene

Post by hrohibil »

Ok UPDATE:

I got it to work liket this:

SetActive(tag=bobbyBook, true);
SetActive(tag=bobby, true);
SetActive(tag=gangMember1, true);
Camera(CameraSHOPMANBOOK,, 4);
{{default}};
AnimatorPlayWait(shopmanhand)->Message(Done);
AnimatorPlayWait(Convo_11_Listening_Loop_IP)@Message(Done)


My issue here, is that during this node, it don't get prompted to next node, I have to manually press the ESC key..
Where the other gives me next node text i can click on to continue..
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom cutscene

Post by Tony Li »

Hi,

If you don't want to show any text with that sequence, use a Continue() command to advance the conversation. Example:

Code: Select all

SetActive(tag=bobbyBook, true);
SetActive(tag=bobby, true);
SetActive(tag=gangMember1, true);
Camera(CameraSHOPMANBOOK,, 4);
{{default}};
AnimatorPlayWait(shopmanhand)->Message(Done);
AnimatorPlayWait(Convo_11_Listening_Loop_IP)@Message(Done)->Message(Done2);
Continue()@Message(Done2)
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Custom cutscene

Post by hrohibil »

Hi Toni

Thanks..

Sorry for the duplicate post...

No i do want text during the cutscene, but as soon as all the text has displayed it, should advance to next node within 2 seconds..
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom cutscene

Post by Tony Li »

Then try this instead, assuming you're not using continue buttons:

Code: Select all

SetActive(tag=bobbyBook, true);
SetActive(tag=bobby, true);
SetActive(tag=gangMember1, true);
Camera(CameraSHOPMANBOOK,, 4);
{{default}};
AnimatorPlayWait(shopmanhand)->Message(Done);
AnimatorPlayWait(Convo_11_Listening_Loop_IP)@Message(Done);
Delay(2)@Message(Typed)
The last line waits until the typewriter has finished, and then it waits 2 additional seconds.

If you're using continue buttons and you want to advance 2 seconds after typing:

Code: Select all

SetActive(tag=bobbyBook, true);
SetActive(tag=bobby, true);
SetActive(tag=gangMember1, true);
Camera(CameraSHOPMANBOOK,, 4);
{{default}};
AnimatorPlayWait(shopmanhand)->Message(Done);
AnimatorPlayWait(Convo_11_Listening_Loop_IP)@Message(Done);
Delay(2)@Message(Typed)->Message(ContinueNow);
Continue()@Message(ContinueNow)
Note that it may cut the animations and Camera() command short if they take longer than 2 seconds + typewriter duration.
hrohibil
Posts: 368
Joined: Thu Nov 04, 2021 12:50 pm

Re: Custom cutscene

Post by hrohibil »

:D
Wow thanks..

One last thing on this regard, I noticed when the custom animation is done playing he just snaps back to the idle animation. I made a line back from the animation node in animator to the idle with exit time. How can I smoothly blend back ?
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom cutscene

Post by Tony Li »

If you're using that line (transition arrow) to idle to change back to the idle state, inspect the transition arrow and increase its Transition Duration.
Post Reply