Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Renad |
so i am using godot 4 Beta 4 and i have a dialogue system and everything in it works fine But there is one Problem bothering me with bbcode
my dialogue system for short when all the characters visible Finisshed = true And when Input pressed I can move to the next phrase
Let’s say, for example, Phrase1 = " are you okay?"
and Phrase2 = “I-I dont feel [shake rate=9 level=10]good[/shake]”
Phrase1 work fine and Finisshed when expected
but Phrase2 continues for a while then" Finisshed Slower than expected
and This is obviously because of the bbcode Although it not visible But the characters are still being typed This makes us wait for it, even though it shows us that all characters visible
and this is my Problem I don’t know how to fix this
part of my code
func _process(delta):
$Mark.visible = Finisshed #Mark is a small image that appears below when all the characters visible
if Input.is_action_just_pressed("Enter"):
if Finisshed:
if PhraseNum == -1:
queue_free()
else :
if Options == false:
NextPhrase()
else :
$Text.visible_characters = len($Text.text)
func NextPhrase():
Finisshed = false
$Text.visible_characters = 0
$Name.text = Dialogs.Name
$Text.text = Dialogs.Text
while $Text.visible_characters <=len($Text.text):
$Text.visible_characters += 1
print("visible_characters",$Text.get_visible_characters())
await get_tree().create_timer(TextSpeed).timeout
Finisshed = true