Jump to content
Harpoon Hanna

Turn a number into a string?

Recommended Posts

Goal: Upon respawn, show the number of times the player has died. This is what I have, which throws the error because I am trying to "say" a number. What is the correct way? I would like to say "You have died X times." Sorry to ask such a n00b question. Thanks.

 

20230617170523_1.jpg

Share this post


Link to post
Share on other sites

I can't help specifically with Editor questions but it might pay to post this in the #editor_yland channel on the Ylands Discord as generally people visit there more frequently than the forums here

Share this post


Link to post
Share on other sites

Hi Hanna there isn't an explicit way to convert from numbers to strings as far as I can tell. Normally the game automatically converts it to a string, not sure why this isn't the case here (might be a bug). but you can easily fix it by adding no text to your number using the string bock shown below.

image.thumb.png.b53ea363d24ac4006377d6c71cf424fc.png
To add the rest of your sentence you can do the following.
image.png.a6a73b2632e0d77bb6147b25f7023529.png

Be aware that this wont work as expected in multiplayer as everyone will share the same death variable so it will display the total number of player deaths and not the individual player deaths.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×