GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to display a negative number in the pre-custom-fonts way

mhedgesmhedges Raised on VCSPosts: 634Member
edited September 2016 in Working with GS (Mac)

Hello -

Before the customs fonts capability was added to GS, the workaround to displaying a score with the font you wanted was to utilize number images.

One of the apps I'm currently working on would benefit from custom font interpolation, but that does not exist yet. Ergo, I will have to resort to the old ways.

Since I will display a variable which can have positive or negative values, the question begs: how do I display a negative value? For example, is there a logical, functional way to do this, or do I simply "spawn actor checksign when attribute is <0" next to the variable's image?

Thanks, regards.

Comments

  • tatiangtatiang Posts: 11,406Member, Sous Chef, PRO, Senior Sous-Chef

    @mhedges said:
    do I simply "spawn actor checksign when attribute is <0" next to the variable's image?

    Sounds good. Is there a reason you need another way?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mhedgesmhedges Raised on VCS Posts: 634Member

    Well, the less I have to do, the better. I thought there could be a more elegant approach than resorting to spawn and destroy.

  • ArmellineArmelline Posts: 4,616Member, PRO

    @mhedges said:
    Well, the less I have to do, the better. I thought there could be a more elegant approach than resorting to spawn and destroy.

    Why would you need to spawn and destroy? Just alpha 0 or 1.

  • mhedgesmhedges Raised on VCS Posts: 634Member
    edited September 2016

    I knew somebody would say that! Btw, dont write emojis in the text box or it'll erase anything after it when you post a message. Seriously, i would've liked an expression which would automatically given me a positive or negative with check sign.

  • ArmellineArmelline Posts: 4,616Member, PRO

    @mhedges said:
    I knew somebody would say that! Btw, dont write emojis or it'll erase anything after it. Seriously, i wouldve liked an expression which would automatically given me a positive or negative with check sign.

    You can do that, but it will still involve spawning/destroying. Or a whole new set of images with the - in front. I suspect that what you're asking for isn't quite what we're thinking you're asking for, as the solutions being offered are super simple and efficient.

    What do you mean by "custom font interpolation," though?

  • mhedgesmhedges Raised on VCS Posts: 634Member

    "custom font interpolation" - what I should've said was scalable/resizeable. I was testing a camera zoom while keeping the HUD in place. The non-text HUD elements (actors) keep their proportion/position just fine, but the text does not keep proportion. It can keep position.

Sign In or Register to comment.