Hi there.
I have a custom-ish dialogue script, cobbled together with the gracious help of threads on here!
Basically it displays a profile picture gui that you can position with a boolean, a background gui, and a text until a player clicks the mouse to advance it on to the next dialogue line.
void DisplayDialogue(this Character*, String message, bool isprofleft, int textcolour)
{
Dispgui.Visible = true;
gBottomBar.Visible = true;
gDialogue.Visible = true;
TextDialogue.Text = message;
TextDialogue.TextColor = textcolour;
if (isprofleft == true)
{
Dispgui.SetPosition(45, 250);
}
else
{
Dispgui.SetPosition(520, 250);
}
while (WaitMouseKey(1000)==0) { }
gDialogue.Visible = false;
gBottomBar.Visible = false;
Dispgui.Visible = false;
}
and, as said, it waits until you click the mouse to go to the next dialogue, which in-situ looks like this:
btnProfileView.Animate(3, 1, 10, eRepeat);
cEGO.DisplayDialogue("this is test dialogue!", true, 62772);
however, since it's WaitMouseKey it registers keypresses as well, including useful ones like PrtScn and such. I want it to only advance forward when you click the mouse.
If I set anything to wait for a mouse click, it automatically skips right to the last line of dialogue, or it just pops up and then closes immediately, such as:
while (IsButtonDown(eMouseLeft)==0);
{
}
gives me an error, and I don't know if I can declare anything outside of this function to bring INTO it, since it's the first one in globalscript.asc, and since it gets imported into all other scripts. There's on_mouse_click as well but that doesn't work within this either. I'm sure there has to be some kind of extremely simple thing that I can't find, and I've looked for hours now...
my question is this: I've tried a ton of different ways and none of them seem to work, is there a simple piece of code that would simply halt the script until you click?
thanks for taking the time to read, I appreciate it!