How do I fix the text object fit in sprite ?

Just started using Construct 2? Post your questions here

Post » Mon Jul 25, 2016 7:14 am

Hi ! Im a new member. I really like Construct 2 and now im stucking @@!
Please help me with this ...
Here is my game.
Image
It's an idle game, like poop clicker. And there is a problem. When i buy pickaxe, the cost for it increase. And if i buy too much, the text object for it cost will run out of the border ....
Here, and the gold text too !
Image
So there is many way to deal with this ? @@!
Very sorry if anyone ask the same question !
B
4
S
1
Posts: 2
Reputation: 304

Post » Mon Jul 25, 2016 11:02 am

Gold wend negative. You see the minus sign. Texbox is not wide enough to write the other characters.

You have to cap things.

Say you substract 1 from gold each click. But it can not go lower then zero. Assuming it is a glabol variable called 'Gold', the calculation is:

Set variable 'gold' to > max(0,Gold - 1)
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jul 25, 2016 6:00 pm

Ah I understand. I made the text box larger ....
And if you don't mind, Can you suggest any method to convert number ? It will be no problem anymore :D
Thanks very much for your help >:D<
B
4
S
1
Posts: 2
Reputation: 304

Post » Mon Jul 25, 2016 6:09 pm

To a string ?
str(number)
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest