How do I make text display an non-exact value?

0 favourites
  • 2 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • I realize this might have everything to do with rounding (I never could) but when a text object displays a value, how would I make it display (for example) 5 instead of 5.3 . I do assume it involves rounding, but not at all sure what I'd need to do here.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Essentially, you have to put any of the system's rounding expressions that suits your needs in front of your value.

    Depending on your needs concerning the rounding, you would use one of the following:

    1) Rounds up

    ceil(value)[/code:29nwr85x]
    2) Rounds down
    [code:29nwr85x]floor(value)[/code:29nwr85x]
    3) Rounds following mathematics rules
    [code:29nwr85x]round(value)[/code:29nwr85x]
    
    Also refer to the manual, system expressions, [i]math[/i] section.
    https://www.scirra.com/manual/126/system-expressions
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)