Can it be done in GS?
ShaunRasulov@y7mail.com
Member Posts: 20
Hi
I am hoping someone can help me out. Iam wondering if one can make sure that when a particular key is pressed, it fills the blank spot first; my game is about guessing a word, so there will be number of letters to choose and i want to make sure that when a particular button is pressed, that one goes first to fill the blank spaces. If it is doable in GS, how can I do it?
I hope it makes sense, and thanks in advance for help,
SR
I am hoping someone can help me out. Iam wondering if one can make sure that when a particular key is pressed, it fills the blank spot first; my game is about guessing a word, so there will be number of letters to choose and i want to make sure that when a particular button is pressed, that one goes first to fill the blank spaces. If it is doable in GS, how can I do it?
I hope it makes sense, and thanks in advance for help,
SR
Comments
Let me give you an idea of how I would probably do it (for 5 lettered words for simplicity):
-Create Table of possible words (1 letter : 1 column)
-Create Scene with 5 Actors to hold guessed letters
-Create Keyboard Actors (1 for each letter), with a Custom Attribute that holds a unique letter
-Fire randomization Rule that picks a random word from the Table
-Populate the 5 Actors with the selected word (1 actor : 1 letter : 1 column)
-Every time a Keyboard Actor is pressed, fire a Rule that checks if its designated letter is part of the randomized word
-If guess is correct, have the Actor(s) that hold that letter do a Change Image or Display Text showing the appropriate letter
-Else, minus a Life from the Player
It's definitely not the best/cleverest solution, but I just wanted to show that it's doable it's a pseudocode but should be easy enough to understand.
Yes, I do not know how to dissect a word into letters :P