S
sjschindler
Guest
Hello, I am relatively new to gamemaker, and I was trying to make a dialogue system where if you press a button (E in this case), you would draw both a text box and text which displays dialogue unique to the person. That I can do. My problem lies with when I press E /while/ the dialogue is still displaying.
For example, if I had a message that was to display this:
"Hello!"
"How are you?"
"That's wonderful!"
You would press Z to advance the dialogue to the next section(Press Z to go from "Hello!" to "How are you?".
However, if I were to press E while the dialogue was currently displaying "How are you?", the dialogue would reset itself.
What I am looking for is a way to prevent the E key from doing anything while this dialogue plays so that if someone were to press E again accidentally, it wouldn't just replay the script.
Here is what I have so far:
In obj_player:
Step Event:
if (distance_to_object(obj_thanos) < (32) && keyboard_check(ord("E"))) //obj_thanos is the name of the character I wish to interact with
{
scr_text("",0.5,488,430) //Script that runs both my dialogue and text box, which work perfectly fine
}
Any help would be appreciated!
For example, if I had a message that was to display this:
"Hello!"
"How are you?"
"That's wonderful!"
You would press Z to advance the dialogue to the next section(Press Z to go from "Hello!" to "How are you?".
However, if I were to press E while the dialogue was currently displaying "How are you?", the dialogue would reset itself.
What I am looking for is a way to prevent the E key from doing anything while this dialogue plays so that if someone were to press E again accidentally, it wouldn't just replay the script.
Here is what I have so far:
In obj_player:
Step Event:
if (distance_to_object(obj_thanos) < (32) && keyboard_check(ord("E"))) //obj_thanos is the name of the character I wish to interact with
{
scr_text("",0.5,488,430) //Script that runs both my dialogue and text box, which work perfectly fine
}
Any help would be appreciated!