Cheat codes using table
SolarPepperStudios
Member Posts: 754
I want to make it so that a player can use keyboard input to enter a cheat code. It would work with a table like the following:
Type: User input: Correct input:
money "user text" moneybags
etc.
I would have an actor that you tap to pull up the keyboard input and how would I put the inputed text into the User input column? Thanks for help!
Type: User input: Correct input:
money "user text" moneybags
etc.
I would have an actor that you tap to pull up the keyboard input and how would I put the inputed text into the User input column? Thanks for help!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Another way to do this is to store the name of the cheat code in a text attribute that is saved to the device. If the player inputs something that matches one of your codes ("moneybags"), you would do Change Attribute game.cheatCodes to game.cheatCodes..game.keyboardInput.."#"
So if they player entered two correct codes, such as "moneybags" and "doublescore", your text attribute would look like:
moneybags#doublescore#
And then your rule to check the codes would be:
When attribute game.cheatCodes contains "moneybags"
.....[behaviors]
When attribute game.cheatCodes contains "doublescore"
.....[behaviors]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User