0 votes

I'm creating a dialog box system, currently, the dialog box will start off as hidden and will only be shown once the player steps on the area that triggers the dialog box to appear. However, i made my dialog box so that the text will be displayed letter by letter (like in most RPGs), but since the code is running before i get to the trigger, the text has already been written... is there avoid this?

in Engine by (21 points)

If you post the code of the dialog (particularly the part tha makes the text show letter by letter) I can help you more, but basically what i would do is only play the animation if visible of the dialog is true

Already fixed it... it was a really dumb mistake, used ''isvisible'' instead of ''FatherNode.isvisible'' so it was checking if the text was visible instead of the whole node :v.

Without seeing your code it's hard to say, but it should go something like this. You have a string that holds the text as displayed on the screen. When you trigger the dialog you run a function that clears this and starts the timer that appends letters to this display string so the typing doesn't occur until the dialog is actually shown. When you hide the dialog you just turn off the timer, so if it's the middle of typing it'll stop.

Glad to hear you solved it. Could you post an answer and select it so other see is resolved?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories