I'm trying to make a dating sim and I am currently working on dialogue boxes. When I click with the left mouse button after all of the text in a string has been written it will move to the next string to write; but I also want use the same mouse click to instantly write all of the string at once. Because I'm using the same mouse input to do two different things. I have tried to use a Boolean variable (called isDone) to differentiate the two mouse inputs but it's complicated things because the moment the isDone variable become true I can't turn it false again.
var dialog = ["Hello and goodbye", "HELLO, GOODBYE!", "Now I say goodbye and you say hello"]
var page = 0
var isDone = false
if event is InputEventMouseButton:
if get_visible_characters() > get_total_character_count():
if page < dialog.size()-1:
page += 1
isDone == false
if get_visible_characters() < get_total_character_count():
if get_visible_characters() == get_total_character_count():
isDone = true
set_visible_characters(get_visible_characters() + 1)
Could someone tell me how to make this work.