Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Danicron |
extends RichTextLabel
var dialog = [“Good Morning Your Majesty!”, “Did you sleep well?”, “I sure hope so we have a VERY busy day ahead!”]
var page = 0
func _ready():
set_bbcode(dialog[page])
set_visible_characters(0)
set_process_input(true)
func _input(event):
if event.type() == InputEventMouseButton && event.is_pressed():
if get_visible_characters() > get_total_character_count():
if page < dialog.size()-1:
page += 1
set_bbcode(dialog[page])
set_visible_characters(0)
func _on_Timer_timeout():
set_visible_characters(get_visible_characters()+1)