GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Question about word games

bhuvan21bhuvan21 Posts: 1Member
edited June 2016 in Working with GS (Mac)

Fist of all, thank you for reading this post. Whether you manage to help me or not, thank you for at least having a go. That said, here's my problem. I'm trying to create a game/program/app thing, where a random string is displayed (from a table), there is a delay, and then a keyboard prompt comes up. So far, that is working fine. However, the idea is that the code should check the word for certain word(s) and for each one that is included, the score goes up. They way I have decided to do this, is by first setting a variable (called "LooperVar") to 0. I then have a loop which runs while "LooperVar" doesn't = "tableCellValue("My table", "a variable containing the random row", "the number of the column containing the amount of keywords for the phrase")
In that loop I have a rule where if "input the player gave" contains (tableCellValue("My table" , "a variable containing the random row" , "LooperVar"+4) (The plus four is because the first keywords start from the fourth column).

The inside "change attribute" of the rule adds one to the score.
After the rule it displays the score, and adds one to the "LooperVar".

Now, however, what happens is that keyboard prompt works, I type in the word "keyword" (that's my test word to make sure it works), then, the score stays the same.

As a fairly young coder, (don't worry though I am 13+) this feels pretty complicated to me. I'm hoping that any of you would be able to help me out.
Thanks in advance!
P.S: I can send screenshots of the code if you would like to see them, as now re-reading this, this is a pretty poor explanation.

Comments

  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO

    It sounds like you want to do this:
    1) Present the user with a set of scrambled letters.
    2) Allow the user to type in a word made from the set of scrambled letters.
    3) When finished typing, a table (with a list of possible correct words) is consulted.
    3) If a legitimate word is typed, then give the user a point.

    What happens after that?

    How does GameSalad know that a word has been typed and needs to start checking the table?

    If the user answered correctly, does the user get another set of scrambled letters? Or does the keyboard entry prompt go blank and the user then types in another word using the same set of scrambled letters?

    If the user types in a non-word what happens?

    Answering these questions will help determine what direction to take to answer your question.

Sign In or Register to comment.