Graphics

 View Only
  • 1.  Force Decimal Point in numerical entry

    Posted 02-10-2017 05:04
    I am trying to figure out how I can force a number entry in a leaderbord to have a decimal when a number is entered, even if it is a whole number. IE: 7 needs to display as 7.0
    I have seen in other posts that you can do it by right clicking on the text item and applying a script. I am unsure what scripting language to use OR how to preview the result to ensure it is functioning properly.

    This is one post I saw that seemed to do something similar.

    One other scenario I have that is basically the same issue is that I have one leaderboard where I need to force it to display 2 numbers after the decimal place. Despite the value in the spreadsheet being 2 IE 8.75 it only displays 8.7

    Thanks for any help.


  • 2.  RE: Force Decimal Point in numerical entry

    Posted 02-10-2017 19:38
    Following up on this in the event anyone finds it. That linked post did in fact solve my question.
    Text = FormatNumber(Text,-1)

    #XPression


  • 3.  RE: Force Decimal Point in numerical entry

    Posted 02-13-2017 14:01
    You can work around it using the delimiter options in Visual Logic, but it was a pain. It would probably be easier to force the issue from your spreadsheet.
    #XPression


  • 4.  RE: Force Decimal Point in numerical entry

    Posted 02-14-2017 14:57
    Just use a formatfloat block in Visual logic, and choose how many digit you want after decimal point. If needed, use also an replace block to replace comma with dot, or dot with a comma.
    #XPression


  • 5.  RE: Force Decimal Point in numerical entry

    Posted 02-14-2017 20:54
    Just use a formatfloat block in Visual logic, and choose how many digit you want after decimal point. If needed, use also an replace block to replace comma with dot, or dot with a comma.

    I will look into this. I am very new to expression (1st project) so a lot of this is still new and doesnt make sense but I will look for this in the manual and see what I can figure out. ;)

    You can work around it using the delimiter options in Visual Logic, but it was a pain. It would probably be easier to force the issue from your spreadsheet.

    We tried this, and it didn't seem to take/update. It is possible I was not updating something properly. I later found that if an item is in the sequencer and you update the template you have to remove it from sequencer and re-add it? I expected it to automatically receive the changes from the template but I guess not. (correct me if I am wrong).

    Thank you both for the time and assistance. I appreciate this community already.

    Regards,
    Chase
    #XPression


  • 6.  RE: Force Decimal Point in numerical entry

    Posted 02-14-2017 20:57
    If a scene is in sequencer (as a take item), any change in scene will update all take items that use this scene (except object that are published ie. text values). No need to remove and add it again...
    #XPression