Adding custom font to a timer (Counting up in seconds)
Zombiebrains
www.zombiebrains.co.ukMember, PRO Posts: 296
Hello everyone
I need some help with a adding custom font to a second timer.
I have created 0-9 actors as custom fonts but now want to add a SECOND timer to go on my scene.
Does anyone have any idea on howe to achieve this, i've seen the custom font thing for scores but need one to just count up in secs as long as the player is still alive.
Any help would be appreciated.
Many thanks.
Anthony @ Zombiebrains
It takes a Zombie to know a Zombie!!!
Comments
You could use your original font for 2 scores but if you wanted a different one lets say you called your 2nd font score1 score2 score3 for e.g. You need something like "score".. in front of your current code.
"score"..game.XXX ..".png"
For the timer just do every 1 second change X to X +1.
Darren.
Hi Darren
Please can you tell me how to do this...
I have created fonts from 0-9 called - 1.png, 2.png etc
I need the code to show this counting up on screen. I have not done any code on this part yet.
It takes a Zombie to know a Zombie!!!
Download our free template Santa Go! it has custom font.
http://www.deepblueapps.com/gs-santago/
Darren.
Thanks Darren, will this work for a second counter too..? I need it to count up in seconds without the zeros on the screen...like a timer.
Thanks in advance
It takes a Zombie to know a Zombie!!!
For right aligned scores (they start on the right and new digits appear on the left), removing the zeros to the left is easy - just put a condition in the digit actor that has it only display when the score is above a certain threshhold. If you want your score to be left aligned, it's a little trickier and requires you to shift digit actors over as the number grows.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Yeah it seems very tricky...all I want is a timer that counts up in seconds with a custom font attached...seems harder to do that the score thing? starts at '0' and then counts up to how long the player lasts.
Can do it easy with attribute 'Seconds' and display that attribute with a add +1 to it each second but really wanted a cool font to go on it.
mmmm stuck
It takes a Zombie to know a Zombie!!!
Re-read my post - it's very easy to do what you want if you want the number to expand from right to left:
To do that just use one of the methods found in one of the free custom font templates. Put all the leading 0s there, but have them be hidden until they are activated (alpha to 0 or something).
If you want the numbers to expand from left to right:
then it becomes a bit trickier. You need to have the numbers shift right/left depending on the size of the number. It's very much possible - I did it for my game Snowflakes (and also for centring numbers) but it's a lot more effort. I keep meaning to make a template for it but keep not getting around to it. @tatiang came up with a pretty slick way of doing it in this thread: http://forums.gamesalad.com/discussion/62646/custom-font-scorekeeping-with-negative-numbers-and-rightward-expansion
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Hi Armelline
Thats great...will take a look and see if I can get it working..
Thanks for your help
It takes a Zombie to know a Zombie!!!
does anyone know why my number fonts are showing as a white box?
Using the Santa Go template but its not showing my numbers properly?
It takes a Zombie to know a Zombie!!!
No worries...works now as I had forgot a ) in the expression.
It takes a Zombie to know a Zombie!!!
Glad you got it working
Darren.
Hi Armelline
Yeah, I think people will find it extremely useful if you could release a template for left to right fonts...hope you can!
It takes a Zombie to know a Zombie!!!
Recently, I have made my custom font score to show score without the zeros.
I have set when the score is < 10
the actor who changes its image depending on the 10s (1,2,3,4...9)
to be in the top of the screen center alignment
when the score is < 100
the actor who changes its image depending on the 10s(1,2,3,4...9) to change its position.x to its previous position,x + 30 for example
the actor who changes its image depending on the 100s(10,20,30,40...90) to change its position.x to actor10s's previous position - 30 for example
100s, 1000s, 10000s are hidden somewhere off-screen when they are not shown.
and so on..
I just wanted to share my workaround for center-aligned custom font scoring.
That's cool...
It takes a Zombie to know a Zombie!!!