This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

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():
load
dialogue()

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 dialogue
index < 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

Godot version Godot engine v3.4.2.
in Engine by (13 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.