Skip to content

Commit 08f8b69

Browse files
Fix blips breaking if skipping text
Fix last character being counted twice
1 parent 46576b0 commit 08f8b69

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ func display_all_text() -> void:
4545
if text_node.visible_characters >= text_node.get_total_character_count():
4646
return
4747
text_node.visible_characters = text_node.get_total_character_count() -1
48-
_update_displayed_text()
48+
_char_position = text_node.visible_characters
49+
_update_displayed_text()
4950

5051

5152
## Starts displaying the text setted by [method set_text]
@@ -187,9 +188,8 @@ func _update_displayed_text() -> void:
187188
return
188189

189190
text_node.set_deferred("visible_characters", text_node.visible_characters+1)
190-
_text_timer.start(text_speed)
191191

192-
if text_node.visible_characters >= text_node.get_total_character_count():
192+
if text_node.visible_characters >= text_node.get_total_character_count()-1:
193193
_text_timer.stop()
194194
_blip_counter = 0
195195
_char_position = text_node.get_total_character_count()
@@ -198,6 +198,8 @@ func _update_displayed_text() -> void:
198198

199199
if text_show_scroll_at_end:
200200
_show_scroll()
201+
else:
202+
_text_timer.start(text_speed)
201203

202204

203205
func _update_original_size() -> void:

0 commit comments

Comments
 (0)