Page 2 of 3

Re: Cinemachine Zoom

Posted: Tue Mar 07, 2023 1:55 pm
by Shinos
T
Tony Li wrote: Tue Mar 07, 2023 11:09 am Here's the CinemachineZoom() sequencer command:

DS_CinemachineZoom_2023-03-07.unitypackage

Syntax:

CinemachineZoom(vcam, zoom, [duration])
  • vcam: The name of a GameObject containing a CinemachineVirtualCamera.
  • zoom: The lens orthograpic size.
  • duration: Duration over which to transition to zoom. (Default: 0 [instant])
Thank you Tony! i tried it and it works but there is only one problem: when i use this command in a dialogue in that same dialogue line the target does not change, for example if i use it at the beginning of a conversation it does not take the first actor etc... the weird thing is that if i do not put any command in the sequencer the target changes automatically to the current actor speaking

Re: Cinemachine Zoom

Posted: Tue Mar 07, 2023 2:22 pm
by Tony Li
This command's purpose is to change the orthograpic zoom level. If you also want to change the target, use CinemachineTarget(), too.

Re: Cinemachine Zoom

Posted: Tue Mar 07, 2023 3:52 pm
by Shinos
Tony Li wrote: Tue Mar 07, 2023 2:22 pm This command's purpose is to change the orthograpic zoom level. If you also want to change the target, use CinemachineTarget(), too.
But if i do not use any command in the sequencer menu it changes target automatically, why is that? :?: i used CinemachineTarget and it works but if i leave the sequencer field blank it does it automatically, it's something there by default?

Re: Cinemachine Zoom

Posted: Tue Mar 07, 2023 3:55 pm
by Tony Li
If a dialogue entry's Sequence field is blank, it will play the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence.

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 11:03 am
by Shinos
Ok i think i got why this was happening , i totally forgot that i put a Cinemachine target globally for the default sequence in the Conversation property https://ibb.co/rpwrKfb so if i do not leave blank a specific dialogue field i do have to specify again the target, isn't there a way to have a "default" sequence property like the target to be always active even if the field is not blank? like to be an additive global property. So i do not have to specify again to put a target if i only want to like put a new command
Also i noticed that the Default sequence in camera e settings is only activated when the default sequence in the conversation property is also blank.
i have only one last question how can i delay the start of a conversation or of a response ? i thought it was the delay function to do that but i was wrong (or maybe i am doing something wrong) , when i use dealy it will only well delay the start of the following Commands but not the start of dialogues entries, so how can i do that? like i want the dialogue to be active so that the camera can zoom over the speaker face but then the actual conversation begins after 3 seconds, or like one of the response is given after a little animation is played so i have to delay the dialogue entry of a little bit

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 1:17 pm
by Tony Li
Shinos wrote: Wed Mar 08, 2023 11:03 amOk i think i got why this was happening , i totally forgot that i put a Cinemachine target globally for the default sequence in the Conversation property https://ibb.co/rpwrKfb so if i do not leave blank a specific dialogue field i do have to specify again the target, isn't there a way to have a "default" sequence property like the target to be always active even if the field is not blank? like to be an additive global property. So i do not have to specify again to put a target if i only want to like put a new command
Include the special keyword {{default}} in your dialogue entry's Sequence field. Example:

Code: Select all

{{default}};
CinemachineZoom(CM vcam2, 5)
Shinos wrote: Wed Mar 08, 2023 11:03 ami have only one last question how can i delay the start of a conversation or of a response ? i thought it was the delay function to do that but i was wrong (or maybe i am doing something wrong) , when i use dealy it will only well delay the start of the following Commands but not the start of dialogues entries, so how can i do that? like i want the dialogue to be active so that the camera can zoom over the speaker face but then the actual conversation begins after 3 seconds, or like one of the response is given after a little animation is played so i have to delay the dialogue entry of a little bit
Add an empty dialogue entry node between <START> and the first text node. Leave its Dialogue Text blank. Set the Sequence field to something like:

Code: Select all

{{default}};
SetDialoguePanel(false, immediate);
CinemachineZoom(CM vcam2, 7);
required SetDialoguePanel(true)@Message(Continued)

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 2:17 pm
by Shinos
Tony Li wrote: Wed Mar 08, 2023 1:17 pm
Shinos wrote: Wed Mar 08, 2023 11:03 amOk i think i got why this was happening , i totally forgot that i put a Cinemachine target globally for the default sequence in the Conversation property https://ibb.co/rpwrKfb so if i do not leave blank a specific dialogue field i do have to specify again the target, isn't there a way to have a "default" sequence property like the target to be always active even if the field is not blank? like to be an additive global property. So i do not have to specify again to put a target if i only want to like put a new command
Include the special keyword {{default}} in your dialogue entry's Sequence field. Example:

Code: Select all

{{default}};
CinemachineZoom(CM vcam2, 5)
Shinos wrote: Wed Mar 08, 2023 11:03 ami have only one last question how can i delay the start of a conversation or of a response ? i thought it was the delay function to do that but i was wrong (or maybe i am doing something wrong) , when i use dealy it will only well delay the start of the following Commands but not the start of dialogues entries, so how can i do that? like i want the dialogue to be active so that the camera can zoom over the speaker face but then the actual conversation begins after 3 seconds, or like one of the response is given after a little animation is played so i have to delay the dialogue entry of a little bit
Add an empty dialogue entry node between <START> and the first text node. Leave its Dialogue Text blank. Set the Sequence field to something like:

Code: Select all

{{default}};
SetDialoguePanel(false, immediate);
CinemachineZoom(CM vcam2, 7);
required SetDialoguePanel(true)@Message(Continued)
Thank you tony, I didn't know about the {{default}}; that's very useful, also i'll try the other workaround you mentioned by leaving a blank dialogue line at the beginning but also what about if i wanna leave some pause between two dialogue lines(not at the beginning), should i do an other blank dialogue? like for suspense etc... but like even in your suggestion how can i set the pause to be precise, like 3 or 5 second, there is not a command for this? how can i control how much time it's left before the next line start
Also i was wondering about an other issue: when i am in a timeline scene and i have a dialogue choice for the player there is this issue where the timeline does not stop so if i am too slow to take a choice or too quick it mess with all the timeline sequence, is there something i am missing to solve this?
i am sorry if i am bothering you i don't wanna abuse of your patience

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 2:23 pm
by Tony Li
Hi,

> what about if i wanna leave some pause between two dialogue lines?

Same thing. Add an empty node. Example Sequence field:

Code: Select all

SetDialoguePanel(false);
SetDialoguePanel(true)@3
More info: Cutscene Sequence Tutorials

> when i am in a timeline scene and i have a dialogue choice for the player there is this issue where the timeline does not stop so if i am too slow to take a choice or too quick it mess with all the timeline sequence, is there something i am missing to solve this?

In the dialogue entry node before the player response nodes, use the Timeline() sequencer command to set the timeline's speed to 0. In the player response node(s), use Timeline() to set the speed back to 1.

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 4:20 pm
by Shinos
Tony Li wrote: Wed Mar 08, 2023 2:23 pm Hi,

> what about if i wanna leave some pause between two dialogue lines?

Same thing. Add an empty node. Example Sequence field:

Code: Select all

SetDialoguePanel(false);
SetDialoguePanel(true)@3
More info: Cutscene Sequence Tutorials

> when i am in a timeline scene and i have a dialogue choice for the player there is this issue where the timeline does not stop so if i am too slow to take a choice or too quick it mess with all the timeline sequence, is there something i am missing to solve this?

In the dialogue entry node before the player response nodes, use the Timeline() sequencer command to set the timeline's speed to 0. In the player response node(s), use Timeline() to set the speed back to 1.
Hi, so it's worth mentioning that here i am using an approach without Continue button so using somethign like this kinda worked

Code: Select all

{{default}};
SetDialoguePanel(false, immediate);
CinemachineZoom(//);
required SetDialoguePanel(true)@5
but if i try with

Code: Select all

{{default}};
SetDialoguePanel(false, immediate);
CinemachineZoom(CM vcam2, 7);
required SetDialoguePanel(true)@Message(Continued)
it does not, i'm kinda confused about the @message(Continued) (in general about what the string after a @ should do) maybe this initial code you sent was intended for a press "continue" input approach?
Also i noticed that the timeline speed works but there is one problem, i put the Continue to never, because i want the timeline to be able to manage my dialogue entries with "continue" in the timeline and not by player input, but when i put the timeline speed to 0 obviously it can't go to the "continue" blocks anymore so to open the response menu i have the player to do a click on the screen to continue, so it stops to be an "automatic" flow is there a way to fix this? i saw again your video
and here you say to put WaitForMessage but i didn't do that i just put Continue to "never" so maybe i am doing something wrong :/

also there is an other "logic" problem, i think i need to switch position of where i am in the timeline based on the response of the player, because if one of the answers gets to a short conversation, i should have the player to get to the bottom of the timeline, instead he continues to go through the "continue" buttons, and we have also the reverse problem where if i have a short branch and a long one, for example let's say i have this : a cutscene that's just like "a conversation between two character where at the end one of them jumps from a roof" in one of the conversation branch there is the player that with only 3 dialogues lines quickly ends the conversation so the timeline would be composed of a start conversation and 3 continueconversationclips, but if i have an other branch of the conversation which is much longer let's say one with 7 dialogue lines i don't have enough continueconversationclips in my timeline, unless i project it taking in mind the longest conversation , but again i need now a way to make the timeline jump to the continueconversationclips i need.
i made an image to explain myself further:
https://imgur.com/a/7lEJqLJ

In the image above there are two branches a "green" one longer, and a "purple" one shorter
(PS:Also correct me if i am wrong but i noticed that if i do not have the dialogue manager put on a "Continue" button approach and i put a quick zoom transition in the sequence like with Zoom2D(//,0.2) and i do not put a Delay(end) the dialogue gets over quickly when the zoom is over, is this expected behavior or i am doing something wrong)

Re: Cinemachine Zoom

Posted: Wed Mar 08, 2023 8:14 pm
by Tony Li
Hi,

The How To Write Sequences section of the manual explains the "@" timing syntax. You can tell a command to wait for a specific time (e.g., Audio(hello)@5) or wait for a message string (e.g., Audio(hello)@Message(sayHello)).

Nothing sends the message string "Continued". This means "required SetDialoguePanel(true)@Message(Continued)" will wait forever. However, if you were using continue buttons, the "required" keyword guarantees that the command will run when the continue button is clicked, even though it hasn't received the message string yet. You can simulate a continue button click like this:

Code: Select all

{{default}};
SetDialoguePanel(false, immediate);
CinemachineZoom(CM vcam2, 7)->Message(DoneZooming);
Continue()@Message(DoneZooming);
required SetDialoguePanel(true)@Message(Continued);

For timelines, use a dialogue UI that doesn't have a visible continue button. Set the conversation's properties > Continue Button to Always. Then you can use Continue Conversation clips to advance each node.