help with custom font?
CodeMonster
ACT, AustraliaMember Posts: 1,078
hey everyone i watched a video from @tshirtbooth showing how to make a score with custom font, i followed everything he did, but when i click preview there is no image displaying on the page, so i cancel and go into the actor and turn off all the rules that i had, and then the image shows up in preview, but i dont understand why i cant get custom font to work, any help would be appreciated thanks!
this is tshirtbooths tutoral:
this is tshirtbooths tutoral:
Comments
i converted it to mac aswell, so its for both mac and pc
http://www.mediafire.com/download/yi48d3aq6agr7vd/My+Great+Project.rar
GSINVENTION FREE TEMPLATES
GSINVENTION FREE TEMPLATES
GSINVENTION FREE TEMPLATES
GSINVENTION FREE TEMPLATES
So is your images named properly? Like 1.png 2.png? Or num_1.png etc? Must end in the number for each image from 0 to 9
If yes then good. The main trip up can be the constrain. So you have a single actor for your score image copied more than once on the scene. This single actor has an integer attribute we call divisor (self.divisor) and the constrain in this actor should be as follows (note I do my numbers with this naming convention num_1.png):
Constrain self.image to "num_"..floor((game.score%self.divisor)/(self.divisor/10))..".png"
Make sure the " and .. Are where they need to be. Your basically saying here that "num_"the number".png but just dynamically setting the number.
Each actor you place in the scene should have the self.divisor from lowest to highest so far right is 10 next 100 next 1000 etc as each represents that score as it proper power of 10 level.
You should at the start of the scene see all 000000 for your actors images but if not it's not getting the image. Check that constrain and make sure it matches what you have set up as names.
Hope this helps you.
GSINVENTION FREE TEMPLATES