keyboard input
stackpoole
Melbourne, Victoria, AustraliaMember, PRO Posts: 473
hello everyone..
I m making a game where the user enters a 'answer' in a text box using the keyboard input rule..
However how would i make it so the 'asnwer' is NOT case sensative..
e.g.
if the answer is KANYE WEST
the user types either of:
Kanye west
kanye West
Kanye West
kanye west
kAnYe WeSt
etc
how can i make sure ALL these possibilities are correct??
(the method i am doing now is long and boring, my rule is)
IF
self.answer2 = self.ACTUALANSWER
self.answer3 = self.ACTUALANSWER
self.answer4 = self.ACTUALANSWER
self.asnwers are basiccally the many different ways to write KANYE WEST...
so is there a simplier way.. sorry for the lengthy post!!
I m making a game where the user enters a 'answer' in a text box using the keyboard input rule..
However how would i make it so the 'asnwer' is NOT case sensative..
e.g.
if the answer is KANYE WEST
the user types either of:
Kanye west
kanye West
Kanye West
kanye west
kAnYe WeSt
etc
how can i make sure ALL these possibilities are correct??
(the method i am doing now is long and boring, my rule is)
IF
self.answer2 = self.ACTUALANSWER
self.answer3 = self.ACTUALANSWER
self.answer4 = self.ACTUALANSWER
self.asnwers are basiccally the many different ways to write KANYE WEST...
so is there a simplier way.. sorry for the lengthy post!!
Sydney Swans 2014!!
Comments
Without a custom keyboard, a better way than what you explained is to make a single text attribute with all possible answers separated by a character:
self.KanyeText: #Kanye west#kanye West#Kanye West#kanye west#kAnYe WeSt#
And then use this rule:
When attribute self.KanyeText contains "#"..self.KeyboardInput.."#"
.....[rules for correct answer]
*The .."#" prevents someone from typing "West" or "kan" or other partial strings.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i think you can display that with this.
Display Text: TableCellValue(row,1,table)..TableCellValue(row,2,table)..TableCellValue(row,3,table)..TableCellValue(row,4,table)
This should help also:
---
Benjamin