0 votes

I have this automated text event I am using to display narration/tutorials/blah-blah-blah and for some reason, whenever the text updates/animates, my player input decides to lock up until the animation is done. I am not using yields or anything so I am a bit curious as to how this is happening. Help appreciated. (Note: my input is only four buttons. Left, right, space and shift).

Here is my event:

    extends Node2D

var _isFaded = false
var _textQueue = 1
export var _BF = 3
export var _textLine1 : String
export var _textLine2 : String
export var _textLine3 : String
export var _textLine4 : String
export var _autorun : bool
const _empty = ""

onready var _fade = $TextBox
onready var _text = $TextBox/TextLabel
onready var _timer = $Timer

func _ready():
    if _autorun == true:

func _textUpdate():
    match _textQueue:
            _textQueue = _textQueue + 1
            if _textLine2 == _empty:
                _textQueue = _textQueue + 1
            if _textLine3 == _empty:
                _textQueue = _textQueue + 1
            if _textLine4 == _empty:
                _textQueue = _textQueue + 1

func _end_text():

func _on_Timer_timeout():

func _on_TextBox_animation_finished(_anim_name):
    if _text.modulate.a == 1:

And this here is my TextBox object that the above class is referencing.

extends AnimationPlayer

class_name DialogueBox

## local variable showing text is 100%/idle
var _text_display = false
onready var _words = $TextLabel

## func to update text
func _update_(_string):

## func to show, with flag to stop player movement
func _show_():
    Director._eventFlag = true
    _text_display = true

## func to vanish and prevent double trigger, player movement unlocked
func _vanish_():
    if _text_display == true:
        _text_display = false
        Director._eventFlag = false
Godot version v3.4.3.stable.official [242c05d12]
in Engine by (548 points)

What does the code Director._eventFlag = true do exactly? How does it affect the player?

Oh. My. God.
I just saw that. It’s exactly as I coded it.

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 Frequently asked questions and 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 [email protected] with your username.