![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Nick888 |
Hello guys.
I asked a question yesterday with title “Counter and Signal”. The issue now is this:
I have an Area2D named “Ambulance”. So, i send a signal from Ambulance to the
RichTextLabel. The RichTextLabels 's Script is the following:
var score=0
func _on_Ambulance_body_entered(body):
score=score+1
set_text(str(score))
pass
The problem is that every string-number is written on the previous one …I mean that when i have the string-number 1 written on the RichTextLabel ,subsequently the string-number 2 is written on the string -number 1 and also subsequently the string-number 3 is written on the string-numbers 1 and 2…That is, one over the other.
Is there a way that i can replace the previous string-number with the new one?
Thank you.