Loading a High Score from a table and using a custom font
MasakoX
Member Posts: 16
Hey guys,
I'm currently working on an endless running game and I've hit a stumbling block with the high score system.
I believe that having a table value of the high score saved is more reliable and I want to load said value to a place on the screen so the player can see it as they play.
However, where I've hit a snag is to load said table value with a custom font. I can do it with the standard text in GameSalad but when it comes to a custom font, I hit a brick wall. What I have are five actors [one for each digit], so what I want to happen is for each high score actor to load each individual digit.
Please help as I really need to get past this before I can continue further.
Thank you so much for your time.
I'm currently working on an endless running game and I've hit a stumbling block with the high score system.
I believe that having a table value of the high score saved is more reliable and I want to load said value to a place on the screen so the player can see it as they play.
However, where I've hit a snag is to load said table value with a custom font. I can do it with the standard text in GameSalad but when it comes to a custom font, I hit a brick wall. What I have are five actors [one for each digit], so what I want to happen is for each high score actor to load each individual digit.
Please help as I really need to get past this before I can continue further.
Thank you so much for your time.
Comments
The easiest way to do this is to create 100,000 images of numbers ranging from 0 to 99,999. You want to name each image the number that it is, so like 87,543 would be named 87543.png. Then constrain the actors image to the score! It's that simple!
If you have less than a millennium to get this done I would consider the method mentioned in the following video. I try to stay away from that method though, because my way uses just one actor which is soooo much easier to manage.
) ) ) I HOPPE you were able to read through the sarcasm ahaha.
Enjoy, PM me if you run into any more bumps in the road.
create a rule:
if (high_score < self.div/10)
then constrain self.alpha to 0
otherwise constrain self.alpha to 1
You don't need to do constrain but I always have because it usually gets rid of some bug that shows up at one point or another.
variables I will be using:
x_starting (where the first numbers x should be)
y_pos (y value of all numbers)
x_spacing (spacing between each of the actors)
constrain y to (y_pos)
constrain x to (x_starting + (5-log(self.div))*x_spacing)
I tried it and it seemed a little tricky.