How to allow the user to type in a number
future_games_101
Member Posts: 58
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
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.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Ok, That helps allot, but i don't understand how to use keyboard input, can someone explain it please!
Double click your actor, then create a rule "When ""Key"" is pressed", then pick your key and make something happen with another behavior.
@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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
thank you, that helped allot!!!
and how do I limit the amount of characters to be typed in the keyboard?
Okay for that you will need to do a custom in game keyboard. There is a video on that over at gshelper youtube site.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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?
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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User