Adding custom number fonts.

Hey Gamesalad community! I've been using this program for awhile now, and every question I've previously had, I've been able to find the answer for on either the forums, or another source. But for this question, I've had no luck with finding the answer.

I've added custom font's by using tsbooth's video, and it works fantastically. All except when it goes to display the number 1. I've double checked everything, made sure the name has .png after it, and I've even re made and re imported the image. Any help? Or do you need more info?

Answers

  • Shadow_DevelopmentShadow_Development Rocklin, CA. United StatesMember Posts: 85
    edited March 2014
    I might need more information on this question before I can determine if I can help you. Thanks! :)
  • otankootanko Member Posts: 5
    What more would you like to know?
  • Shadow_DevelopmentShadow_Development Rocklin, CA. United StatesMember Posts: 85
    edited March 2014
    I would like to know if you are using "Change Image", "Display Text" behavior, etc. Also may you send me a URL of the video so I can double check your steps?
  • otankootanko Member Posts: 5
    edited March 2014
    I have an actor with the 0 image preloaded, and for behaviors, I have the constrain self.image to floor((game.total score%self.div)/(self.div/10))..".png". All my other numbers work great, which are 0, and 2-9. Just when it get to a number that should display 1, it disappears.
  • Shadow_DevelopmentShadow_Development Rocklin, CA. United StatesMember Posts: 85
    -Go to the zero image

    Constrain Attribute: Self.image To. floor))game.score%self.div)/(self.div/10))

    -Add another actor

    On the new actor:

    Display Text: game.score

    Go to the "Add to score button/actor" (If you have one)

    Touch is "pressed"

    Change Attribute: game.score to. game.score+(Any Number You Want)

    ---------------------------------------------------

    Let me know if your issue is solved. Thanks!
  • ArmellineArmelline Member, PRO Posts: 5,370
    edited March 2014
    Put a display text behaviour in the actor and copy the formula you are using for the image attribute into the display text. (Copy it, don't retype it - you can copy between two formula windows as long as you open both at the same time.) See if it shows the number 1 there. If it does, then the problem is probably with your image file. If it skips the number 1 there too, take a screen shot of the formula for us.
  • Shadow_DevelopmentShadow_Development Rocklin, CA. United StatesMember Posts: 85
    Put a display text behaviour in the actor and copy the formula you are using for the image attribute into the display text. (Copy it, don't retype it - you can copy between two formula windows as long as you open both at the same time.) See if it shows the number 1 there. If it does, then the problem is probably with your image file. If it skips the number 1 there too, take a screen shot of the formula for us.
    That's similar to what I said, but I do agree with you on that. @otanko if my advice doesn't help you try @Armelline's solution.
  • ArmellineArmelline Member, PRO Posts: 5,370

    That's similar to what I said, but I do agree with you on that. @otanko if my advice doesn't help you try @Armelline's solution.
    Great minds think alike :D Seems I was typing mine while you were posting yours :D
  • otankootanko Member Posts: 5
    I did what Armelline suggested, and it displays 1. So that shows it is working. Could it be something screwed up with my image? I made all of the numbers exactly the same, which is where I get confused...
  • ArmellineArmelline Member, PRO Posts: 5,370
    Next try turning off the constrain image, and adding a new constrain image that constrains it to just "1.png", see if it shows up then.
  • otankootanko Member Posts: 5
    edited March 2014
    Out of curiosity, I made a new actor, and used the 1.png as the image for that actor. I clicked put the 1.png actor on the screen and clicked preview, and the 1 didn't even show up. So that says there's a problem with the image?
  • ArmellineArmelline Member, PRO Posts: 5,370
    Looks very likely. Save your project, then delete the image (save first though as sometimes GameSalad gets creative with which images it deletes). Re-save the image in whatever image editing software you're using, then add it to your project again.
  • otankootanko Member Posts: 5
    I figured it out! It was because I was saving the number with .png after it. I feel stupid, because I was physically typing out .png after the name without thinking that it would already be there. Thank you guys for your help! I really appreciate it!
  • WbokoWboko Tennessee, USAMember, PRO Posts: 621
    It always makes me smile when someone answers their own question... Thank you @otanko‌!

    Most people never come back with the answer that may help someone else in the same boat because they did something silly like add .png to the file name. You did awesome and trust me someone will end up doing the same thing!
Sign In or Register to comment.