letter checking

fedifedi Member, PRO Posts: 31
edited May 2012 in Working with GS (Mac)
Hi,

i have searched the forum an tested the word checker from thb , but still not found what i'm searching for.
So here what i want to do. The Player has to guess/find a specific word.
what i have done so far an its working perfectly , if the player enter the right word (over custom keyboard) it goes to the next word. what i want to add now is lets say a true/false (green /red light) behavior at each letter he is typing.
example the player has to find out the word ... gamesalad
as soon he typ g it goes to true , ga still true gam still true, gamr it goes to false.....
can any one help me with this ?
thx a lot

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited May 2012
    im pretty sure for that you would need searchable tables

    the way i would imagine doing it is each row would be a word. The first column would contain the first letters of each word, second column would have second letters and so on. You would keep track of the amount of letters the player has chosen and search the column to see if any words contains that letter. So when your on the second letter it would search the second column which would be the second letter in each word you have stored to see if it any word contains chosen letter in its second spot. But we dont have searchable tables.

    edit: i think i missunderstood, if you have one set word each time there trying to make, you can get away doing it. But if your using the keyboard that will cover the screen and you wont see the green or red behind it anyway and it wont get updated till after they press enter on the keyboard, it wont update each time they type a letter in the text field.
  • simo103simo103 Member, PRO Posts: 1,331
    @fedi ... I believe you will need to work in your spreadsheet program and create !g! then !ga! then !gam! then !game! etc until you have the full !gamesalad! ... you will then have a rule to see if it CONTAINS the 1 letter typed with !g!, 2 letters typed guess with the two letter set ie: !ga!, three letters with !gam! etc. Can't see anyway around this as there is noway I know of to handle/compare part of the whole word.

    If you are doing lots of words, excel can help split words into letters and add the ! at each side using functions
  • simo103simo103 Member, PRO Posts: 1,331
    @fedi ... having said that you could also split your word into letters inside the tables and choose a row randomly as your word. Load those letter values into Letter1, Letter2, Letter3 etc attributes. Then compare Typed1 value with Letter1 value, Typed 2 value with letter2 value etc
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited May 2012
    @simo103

    thats what i was thinking but the main issues is if hes using the ios keyboard, it wont update dynamically as you type in a letter. The player would have to press enter after each letter they type in, to see if its red or green which would be a pain.
  • simo103simo103 Member, PRO Posts: 1,331
    @JohnPapiomitis ... ahhh ... yes that would generally screw up the effect royally.
  • fedifedi Member, PRO Posts: 31
    Thx for the answers. Im using the custum keyboard template from tshirtb. There i have the typing attribute which contains the letters that user has typed in. I have tried with !typing.atrribute! And every 1 sec rule check if it contains. But dident worked ore i did it wrong dont know.
  • fedifedi Member, PRO Posts: 31
    i have made a little test, i have tried to replace the ! by *
    lets say the text attribute what the player has to guess is abcde i have tried with *abcde*
    and a timer every sec text.attribute( which is *abcde*) contains "*"..Typing.Attribute.."*" change game.check to 1 otherwise to 0.... and more ore less it works. when nothing ist typed its 1 (which schouldent be) but when i type 2 wrong letters it goes to 0 ,
    example i type :
    h still 1, hh goes 0
    a 1 akk0 abc1 abch 1 abchh 0
    so it goes 0 when i write more than 2 letter false

    any idea ?
Sign In or Register to comment.