Skipping Dialogue Lines

Get help using Construct 2

Post » Sat Dec 14, 2013 6:31 pm

Hi everyone! So I'm having a bit of trouble incorporating a skip function into my dialogue system. I want the game to skip the current line of dialogue if the mouse is clicked.

This is how my current system works:



The line of dialogue appears, then the system waits a set number of seconds as defined by the 'textSpeed' variable. With this system I can't simply create an on click event to turn textSpeed to 0, as this wouldn't apply to the current text on screen as it's already waiting the number of seconds as originally defined by textSpeed.

The only way I can see around this at the moment is this:



This causes the system to wait in small increments, meaning if the mouse is clicked between two of these wait actions it will change value in all the follwing actions to 0, but obviously this really clogs up the game with a load of actions, as this needs to be done every time someone speaks.

It would be OK if I could trigger this through a function, but I can't as the function would wait independently of the event. I also wouldn't be too worried if I could neatly collapse of the wait events into one.

Any ideas would be greatly appreciated.
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Tue Apr 21, 2015 9:20 pm

did you ever figure this out?

I'm about to start a dialogue skip feature and I was just browsing if anyone had done it. I think I'm going to use the "Is Tag Playing" and skip it that way. but it's going to be tricky since some of the audio is timed with animation..
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Apr 21, 2015 9:24 pm

try to use "wait for signal"

on mouse click --> "signal"

on timer "your time" --> "signal"
Image Image
B
26
S
15
G
143
Posts: 882
Reputation: 74,562

Post » Sat May 02, 2015 9:15 pm

jobel wrote:did you ever figure this out?

I'm about to start a dialogue skip feature and I was just browsing if anyone had done it. I think I'm going to use the "Is Tag Playing" and skip it that way. but it's going to be tricky since some of the audio is timed with animation..


I didn’t really figure it out, and made a compromise instead. I created a variable that stored all the characters current text, if you clicked when a character is talking it would set the game time to 20, then restore it to 1 once the variable changed, i.e. when the next line of text appeared. Obviously it isn’t great as it means the whole game time speeds up, and you have to set object timescales individually to 1 to stop it from looking strange.

@MadSpy 's suggestion has just changes all of this though! I hadn’t even considered wait for signal, in fact I’d never even considered what this action did. Since reading this about 10 minutes ago, I’ve created a new system to skip text which works flawlessly! I wish I’d known about this 2 years ago! Now to go through hours of dialogue and add this new system! Thanks @MadSpy , this is a game changer!
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Sat May 02, 2015 10:18 pm

@AlexFrancois Glad to know that it helps you.
Let us know if everything works.

(sorry for my basic english)
Image Image
B
26
S
15
G
143
Posts: 882
Reputation: 74,562

Post » Sat May 02, 2015 11:07 pm

You could have done the same thing with functions as I see it, btw
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Tue May 05, 2015 9:13 am

mindfaQ wrote:You could have done the same thing with functions as I see it, btw


The same thing can't be done with functions, when a functioned is called it runs separately to the event which called it, meaning that if the function contains a wait action the event will keep running, only the function will wait.
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Tue May 05, 2015 3:40 pm

No need to pack the code in one event, you can just contain the skip code in a function and call it by the mouse or timer event
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Wed May 06, 2015 7:49 am

mindfaQ wrote:No need to pack the code in one event, you can just contain the skip code in a function and call it by the mouse or timer event


Yes, that's how I'm doing it. I call a function, then have the wait for signal action. The function waits a specified amount of time depending on the length of dialogue, then calls the signal, or if the player doesn't want to wait, they can left click and this will also call the signal.
B
11
S
3
Posts: 135
Reputation: 1,309


Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666, DolyGamesCosmos, Julot135 and 29 guests