Display Text Questions
davidsalomon
Member Posts: 136
Hello everyone, I need to know 2 things:
1) Is it possible to use more fonts? GS only offers me very little options.
2) I want to display time, but I would like to display it like " 00:00" instead of "00.00"
[ds]
1) Is it possible to use more fonts? GS only offers me very little options.
2) I want to display time, but I would like to display it like " 00:00" instead of "00.00"
[ds]
Comments
1) Yes, there is a demo inside the Creator for Custom Fonts in GameSalad. But as far ash selecting more from the drop down in the Display Text behavior, what you see is what you get for now.
2) Type this code into your Display Text behavior:
floor(floor((self.time%3600)/60)/10)..floor((floor(self.time %3600)/60)%10)..":"..floor((self.time%60)/10)..floor(self.time%10)..":"..(floor(self.time* 10(%10)..floor(floor(self.time*100)%10)
Floor provides the value when you round down to the nearest integer. The % sign provides the remainder after a division (also known as modulus division). (10%3 = 1; 17%3 = 2) Here, self.time provides a value (in tenths of a second) which we are modifying to get the correct time values for each place in the 00:00:00 timer. If you only want the minutes and seconds in your timer. leave off the code starting with the last semicolon.
Hope that helps
- Alex
[ds]
Good luck,
- Alex
Just make your fonts and words and everythign in photoshop and use the images to display your fonts. And search custom font in the creator like said above to learn how to use custom fonts with scores and time and such
cheers
So if I have a number 1.2444, how do I make it display 1.24 instead?