#fireballText Text FireBall ToString

1 messages · Page 1 of 1 (latest)

fresh wyvern
#

Thanks mate I will give that a try now

azure jasper
#

or you can one line it. and remove the Fireball++;

#

FireballText.text = ++FireBall.ToString();

#

use whichever is easier to understand for you

fresh wyvern
#

No that makes sense what you've said. It's flagging an error saying it needs to be a string int field. Is that because my counter has no text?

azure jasper
#

(++Fireball).ToString();

#

my bad

fresh wyvern
#

So the ++ in C# is that what you use to declare it a integer? Kind of like "" is a string

azure jasper
#

no it increments the value by 1

fresh wyvern
#

ahhh nice that worked man! Hell yeah. I saw a YT on it but he had a word in his final like that it referenced off. Tyvm for your help 🙂

azure jasper
#

I saw a YT on it but he had a word in his final like that it referenced off

#

if you can explain waht this means, i can explain what it means

#

er

#

you know what i mean

fresh wyvern
#

Oh sorry I just meant I got that script from a youtube, but his counter used a text within the counter, so his last line of code didn't work for me. The ToString part was the missing piece I didn't know about - so thank you

azure jasper
#

no prob

#

did he do "$"{Fireball++}";

fresh wyvern
#

I think his was something like
cherryText.text = "Cherries: " + cherries;

azure jasper
#

as yes

#

that makes the text on screen show Cherries: 10

#

for example