Zeropad in a variable

Show us your works in progress and request feedback

Post » Wed Feb 04, 2015 1:15 pm

Hi there,
I'd like to display the variable "life" as 005, 010, 020 and so on. I have a spritefont with the text set as the "life" variable.
But it doesn't display the zero's. When trying zeropad I still can't figure it out.

Here's a example of what I'm trying to achieve:
Image
B
8
S
4
Posts: 120
Reputation: 1,266

Post » Wed Feb 04, 2015 1:23 pm

Set text to zeropad( variable, 3) should work fine..
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Feb 04, 2015 10:23 pm

Thanks alot!, worked exactly how I wanted, I guess I just was handling it wrong.
B
8
S
4
Posts: 120
Reputation: 1,266


Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: Fradno and 2 guests