How can I put My character in the text box

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nevisnow
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 _on_Tween_tween_completed(object, key):

finished = true

Ask more clearly what you want to do

ramazan | 2022-03-20 12:44

:bust_in_silhouette: Reply From: Gluon

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.

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

Nevisnow | 2022-03-20 23:55