I am using RichTextLabel for a visual novel but when I play the scene, only the visuals like background and images and text box shows, my text (dialogue) that I coded doesn't show and I'm not getting any error in my code either so I'm not sure why it isn't working.
If someone knows or has any ideas, I would appreciate it if you could help me out here. Thank you in advance!
(blob:https://mail.google.com/31767a02-507a-4110-b124-1888f0c3bab6) ~ Image
Code-----
extends Control
onready var text = getparent().getnode("Dialogue").dialogue_1
var dialogue_index = 0
var finished
var active
var position
var expression
func ready():
loaddialogue()
warning-ignore:unused_argument
func phyysicsprocess(delta):
if active:
if Input.is_action_just_pressed("ui_accept"):
if finished == true:
load_dialogue()
else:
$TextBox/Tween.stop_all()
$TextBox/RichTextLabel.percent_visible = 1
finished = true
func loaddialogue():
if dialogueindex < text.size():
active = true
finished = false
$TextBox.visible = true
$TextBox/RichTextLabel.bbcode_text = text[dialogue_index]["Text"]
$TextBox/Label.text = text[dialogue_index]["Name"]
position = text[dialogue_index]["Position"]
$TextBox/RichTextLabel.percent_visible = 0
$TextBox/Tween.interpolate_property(
$TextBox/RichTextLabel, "percent_visible", 0, 1, 2,
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT
)
$TextBox/Tween.start()
else:
$TextBox.visible = false
finished = true
active = false
dialogue_index += 1
func onTweentweencompleted(object, key):
finished = true