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.