I'm trying to add a death count to the end screen of my game, but the richtextlabel won't change.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OiKeTTLe

I’ve been trying to change a richtextlabel in a singleton. I’ve done this successfully for an almost identical system. The example in the bottom of the image works. The one on the top is the one I’m having issues with. Am I doing something wrong? The only issue I can see is the node being an area instead of a body.
The Code I've written for this system. The bottom one works, the top doesn't. I don't know why.

what exactly is not working?
does the code enter the _on_respawn_area_entered() section?

Andrea | 2021-03-22 13:54

No errors, nothing in debugger code. I meant to say the text wouldn’t change; if I change set the text in the editor to 0, it says 0. Yes, the code enters the _on_respawn_area_entered() section.

OiKeTTLe | 2021-03-22 23:08

Now neither of them work

OiKeTTLe | 2021-03-22 23:23

sorry but you have a print("death count") line inside the _on_respawn_area_entered(), and you said nothing is displayed in the debug.
this is quite a strong evidence that piece of code is NOT being executed, meaning _on_respawn_area_entered() is not called, or am i wrong?

Andrea | 2021-03-23 23:19

:bust_in_silhouette: Reply From: Inces

You mean no error shows up, no issue in debugger console, just no text appears ?
Did You disable BBCode for both of those Rich text labels ?

No errors, nothing in debugger code. I meant to say the text wouldn’t change; if I change set the text in the editor to 0, it says 0. BBCode is disabled for both of them.

OiKeTTLe | 2021-03-22 23:07

Now neither if them work

OiKeTTLe | 2021-03-22 23:23