Input does not respond when textLabel updates?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SnapCracklins

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:
		_textUpdate()


func _textUpdate():
	match _textQueue:
		1:
			_fade._update_(str(_textLine1))
			_fade._show_()
			_timer.start(_BF)
			_textQueue = _textQueue + 1
		2:
			if _textLine2 == _empty:
				_end_text()
			else:
				_textQueue = _textQueue + 1
				_fade._update_(str(_textLine2))
				_fade._show_()
				_timer.start(_BF)
		3:
			if _textLine3 == _empty:
				_end_text()
			else:
				_textQueue = _textQueue + 1
				_fade._update_(str(_textLine3))
				_fade._show_()
				_timer.start(_BF)
		4:
			if _textLine4 == _empty:
				_end_text()
			else:
				_textQueue = _textQueue + 1
				_fade._update_(str(_textLine4))
				_fade._show_()
				_timer.start(_BF)
		5:
			_end_text()


func _end_text():
	_fade._vanish_()
	self.queue_free()

func _on_Timer_timeout():
	_fade._vanish_()

func _on_TextBox_animation_finished(_anim_name):
	if _text.modulate.a == 1:
		_fade.stop()
	else:
		_textUpdate()

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):
	_words.set_text(_string)


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


## func to vanish and prevent double trigger, player movement unlocked
func _vanish_():
	if _text_display == true:
		self.play_backwards("showText")
		_text_display = false
		Director._eventFlag = false

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

Ertain | 2022-07-03 23:33

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

SnapCracklins | 2022-07-04 04:35