0 Favourites

Skipping Dialogue Lines

  • 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:

    <img src="https://31.media.tumblr.com/4a2a87e167339b79f76e5fbcc83f17c5/tumblr_mxt7awKbx41syyjsno1_400.png" border="0" />

    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:

    <img src="https://31.media.tumblr.com/91dfd4f97ee2b3e2ab94de3adb9ba127/tumblr_mxt7awKbx41syyjsno2_1280.png" border="0" />

    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.

  • 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..

  • try to use "wait for signal"

    on mouse click --> "signal"

    on timer "your time" --> "signal"

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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!

  • AlexFrancois Glad to know that it helps you.

    Let us know if everything works.

    (sorry for my basic english)

  • You could have done the same thing with functions as I see it, btw

  • 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.

  • 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

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)