Page 1 of 1

Custom cutscene

Posted: Sun Feb 27, 2022 7:08 pm
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?

Re: Custom cutscene

Posted: Sun Feb 27, 2022 7:43 pm
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.

Re: Custom cutscene

Posted: Mon Feb 28, 2022 2:32 am
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)

Re: Custom cutscene

Posted: Mon Feb 28, 2022 2:44 am
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..

Re: Custom cutscene

Posted: Mon Feb 28, 2022 10:20 am
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)

Re: Custom cutscene

Posted: Mon Feb 28, 2022 10:54 am
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..

Re: Custom cutscene

Posted: Mon Feb 28, 2022 1:19 pm
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.

Re: Custom cutscene

Posted: Mon Feb 28, 2022 1:27 pm
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 ?

Re: Custom cutscene

Posted: Mon Feb 28, 2022 1:35 pm
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.