+1 vote
Hi, I followed this tutorial here https://www.youtube.com/watch?v=kkLqW8WhCgg and the guy didn't explain about the character showing up in the textbox, as I want to do that i came here for help

this is the code I used

extends Control

var dialog = [

"texttexttetxttetx[wave]texttexttetxttetx[wave].",

"[shake] texttexttetxttetx [shake] texttexttetxttetx!?!?!",

"[shake]texttexttetxttetxt[shake]",

"[shake]texttexttext[shake]",

"[shake]texttextetxt[shake]",

"[shake]texttexttext[shake]",

"[shake]texttexttext[shake]"
]

var dialogIndex = 0

var finished = false

func _ready():

load_dialog()

func process(delta):

$"Mouse".visible = finished

if Input.is_action_just_pressed("ui_accept"):

load\_dialog()

func load_dialog():

if dialogIndex < dialog.size():

finished = false

$RichTextLabel.bbcode\_text = dialog\[dialogIndex\]

$RichTextLabel.percent\_visible = 0

$Tween.interpolate\_property(

    $RichTextLabel, "percent\_visible", 0 , 1 , 1,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT
)

$Tween.start()

else:

get\_tree().change\_scene("res://Enemies/UraniumFight.tscn")

dialogIndex += 1

func onTweentweencompleted(object, key):

finished = true

in Engine by (15 points)

Ask more clearly what you want to do

1 Answer

0 votes

I dont know exactly what the person in your tutorial did but if I was trying to do this I would probably have a small png image which appeared over the top of the dialog box and control it with the .visible property to turn it visible whenever there was dialogue from that character.

by (1,635 points)

Hi, I changed to another tutorial but using json file, sorry for wasting your time, im really really sorry

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 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 webmaster@godotengine.org with your username.