Hi
I generally use continue key (in my case spacebar) in my game. I find it works great to let the player decide the flow of the conversations this way.
But I was wondering whether I could use this method in timelines too, so that players progressed through a timeline cutscene by tapping space to go to the next dialogue entry?
I'm thinking some code that paused the timeline/game on every continue node, then jumping to the next continue node when space (or a button or whatever) is pressed before starting the timeline again from there. And there would have to be the option of not jumping sometimes, when you want some other actions in the timeline to take place.
Is this feasable? I could probably write it myself, but I was thinking you could maybe set me on the right road so I don't waste too much time looking at dead ends.
Using continue key in timeline?
Re: Using continue key in timeline?
Hi,,
Yes, you can do that. Assuming your timeline is named "yourTimeline", set the conversation's Default Sequence to something like:
The first command pauses the timeline by setting its speed to zero.
The second command waits until it receives the message "Continued" -- which, technically, nothing in the Dialogue System ever sends. It's just an arbitrary string I chose. However, when the player continues by pressing the continue button, the "required" keyword guarantees that the command runs, which resumes the timeline by setting its speed to one.
You could add other commands in there, such as this to hide the continue button until the typewriter has finished:
(The "Typed" message is actually sent by something in the Dialogue System -- the typewriter effect.)
And/or clear the text after a delay based on the text length:
Yes, you can do that. Assuming your timeline is named "yourTimeline", set the conversation's Default Sequence to something like:
Code: Select all
Timeline(speed, yourTimeline, 0);
required Timeline(speed, yourTimeline, 1)@Message(Continued)
The second command waits until it receives the message "Continued" -- which, technically, nothing in the Dialogue System ever sends. It's just an arbitrary string I chose. However, when the player continues by pressing the continue button, the "required" keyword guarantees that the command runs, which resumes the timeline by setting its speed to one.
You could add other commands in there, such as this to hide the continue button until the typewriter has finished:
Code: Select all
Timeline(speed, yourTimeline, 0);
SetContinueMode(false);
SetContinueMode(true)@Message(Typed);
required Timeline(speed, yourTimeline, 1)@Message(Continued)
And/or clear the text after a delay based on the text length:
Code: Select all
Timeline(speed, yourTimeline, 0);
ClearSubtitleText(all)@{{end}};
required Timeline(speed, yourTimeline, 1)@Message(Continued)
Re: Using continue key in timeline?
Thanks!
I got a nice functionality working by starting from your suggestions here.
Very satisfied customer as always!
I got a nice functionality working by starting from your suggestions here.
Very satisfied customer as always!
Re: Using continue key in timeline?
Glad to help!