How to allow the user to type in a number

I am trying to make an app where the user selects types in a # between 1 and 5,000, but i have no clue how to start. ( I will be needing this for the iphone not the web) PLEASE HELP!!!

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    You could use the keyboard input behavior (I think it allows to enter a integer) then evaluate the result of what the user typed in.

  • future_games_101future_games_101 Member Posts: 58

    Ok, That helps allot, but i don't understand how to use keyboard input, can someone explain it please!

  • wayback_gamerwayback_gamer USMember, PRO Posts: 124

    Double click your actor, then create a rule "When ""Key"" is pressed", then pick your key and make something happen with another behavior.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited December 2015

    @future_games_101 If you need to provide additional details about what is/is not working for you but your thread (this one) is buried, click on the My Discussions link at the top-right of the forums page to find it and then post new information.

    There is a wealth of information in the forum of tutorials and videos available by simply Googling gamesalad [term] such as gamesalad keyboard input.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

  • future_games_101future_games_101 Member Posts: 58

    thank you, that helped allot!!!

  • future_games_101future_games_101 Member Posts: 58

    and how do I limit the amount of characters to be typed in the keyboard?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Okay for that you will need to do a custom in game keyboard. There is a video on that over at gshelper youtube site.

  • future_games_101future_games_101 Member Posts: 58

    Are you sure, because I was researching this, and "manu apps" said, "You can use the new textSubStr function to only display a number of characters of a string.

    For example textSubStr(game.string,0,9) would only return the first 10 letters of the game.string attribute.

    Here's an example with keyboard input."
    But I tried this and didn't work, is that because I have to have a custom keyboard, or because I didn't do it right?

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

    If you use textSubStr() to limit the number of characters in a Display Text behavior, that will certainly work but it won't actually limit the entry of those characters in the Keyboard Input behavior. In other words, I could type "This is the coolest RPG ever!!! I can't believe this is even a game. WOW" and you could display textSubStr(self.Input,1,4) and it would show "This".

    To limit entry, you would have to use a custom keyboard. Try this: http://gshelper.com/shop/free-templates-and-tutorials/custom-keyboard-2-limit-text-string-in-gamesalad-video-tutorial.

Sign In or Register to comment.