How I put only one point im my num

0 favourites
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello! I want to know how I put "."(point) in my text.

    My text is a Price and the player can put only one point in the price!

    How I put this point and limit to one??

    "My buttons is a sprit and all sprites have a one Stance Variable...but when I put the point in the famili, the instance variable is 0 to my point."

    thanks!

    <img src="smileys/smiley5.gif" border="0" align="middle" />

  • If you want a .capx giveme your email , that i put in the dropbox!

  • Assuming you only want two digits after the point.

    Here you are

  • Amazing guy!!!

    You help me a lot!!!!

    Thanks so much!!!!

    <img src="smileys/smiley42.gif" border="0" align="middle" />

  • Noticed a mistake.

    improved version

  • Well, in your exemple you can put "." before the "."...

    it' is wrong!

    How I do to don't put "." like:

    .123

    12.

    for exemple!?

  • In my have have a button, a Enter that set a price to the product.

    If my client put U$ .21 Or U$ 15.

    WHAT i do?

    It is Regular Expression...but how I do this regular expressions?

  • I don't know how I send my .capx to you...I create a enter button and a new display that you can set the price!!!

    If you want to add in facebook! it is my Link!

    facebook.com/pablo.rodrigues.16940599

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • , do you want to make a game, or do you want someone else to make it for you?

    What I've made is not wrong. I've made what you asked for. So maybe what you have asked for is wrong.

    I've spent time on what I made. Not only the time thinking about how and making the events, but also the time learning how to use Construct2.

    I hope you find the time to learn how to make a program or find someone who wants to do it for you.

    In the future, before you ask a question, please think about what it is you want.

    You wanted limited characters - you've got them

    You wanted a point (and only one) - you got that

    If you'd told from the beginning exactly what you wanted I could have made that, but I think I've tried to help you enough and I believe you should be the one writing your game.

    Good luck!

  • When I say wrong, I say about the text that is set with the point before the number!

    I don't say that you are wrong!

    I writing my game here! but I don't know how to send my exemples!

    I have a .CAPX here to send...but i don't know how...

    Sorry, you don't wrong, the text that set wrong...when you click in the poit frist for exemple!

    Exist limitations in my game that I will solve...

    UNFORTUNATELY I DON'T KNOW HOW TO SEND TO YOU MY EXEMPLE...But don't think that you are making a game to me!!!

    I only want a help!

    Thanks...and I'll send the exampeles when I know!!

  • dropbox.com/s/yb70b2stdgplehb/keyboard_editenter.cap

    Try to download in this link

    the exemple with display -> text

  • I make a text where the gamer can't put "." in the front of the number

    When you call the function:

    On click in "." -> you put under this event

    text -> compare text -> "" ignore case

    and invert the event!!!!

  • you could set it, so that if text is "" set text to "0."

    and on enter if point is not yet used add ".00" to text

    if point is used but charactercount is not equal to text.limit add "0" to text.

    I'm not sure, but I think something like that will work.

  • Well, "0" is a valid number in this game, couse if the gamer set 0 to price, the of the lemonade is 0, and player will fail...

    This game is a "Serious Game" about a Lemonade store...to the people learn how administrate a store!

    I do with which the point "." only is used before other number...

    My work finish now, see you tomorrow...thanks for help!

    <img src="smileys/smiley20.gif" border="0" align="middle" />

  • I meant that if someone enters .25 it would automatically become 0.25

    and if someone enters 25 it will automatically become 25.00

    and if someone enters 0.5 it will automatically become 0.50

    Just making it easier for the user and keeping the output after enter logical.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)