Skip to content

Commit 46576b0

Browse files
Fixes the _char_position tracking in dialog_node.gd. This resolves incorrect blip sounds if the text box has text added to it instead of set.
1 parent 397f198 commit 46576b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addons/textalog/nodes/dialogue_base_node/dialog_node/dialog_node.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func display_text() -> void:
5858
func set_text(text:String) -> void:
5959
text_node.bbcode_text = text
6060
text_node.visible_characters = 0
61+
_char_position = 0
6162
rect_min_size = _original_size
6263
if text_fit_content_height:
6364
_enable_fit_content_height()
@@ -191,7 +192,7 @@ func _update_displayed_text() -> void:
191192
if text_node.visible_characters >= text_node.get_total_character_count():
192193
_text_timer.stop()
193194
_blip_counter = 0
194-
_char_position = 0
195+
_char_position = text_node.get_total_character_count()
195196
_already_played = false
196197
emit_signal("text_displayed")
197198

0 commit comments

Comments
 (0)