I would like to create a program where the user is asked to match a sprite to a querry.
For example, the letter "B" is shown to the user and he/she has to click all the (moving) sprites which start with the letter B (e.g., the Ball sprite, the Banana sprite.... but not the car sprite).
For this, I am thinking I would need to assign a "value" to a sprite and give points whenever the cursor is clicked on a sprite of the correct value (relative to the prompt).
Has anyone done something similar? Any suggestions would be much appreciated.
Offline
Maybe something like:
Assign a variable to each letter (A=1, b=2, etc), then:
[scratchblocks]
when bat clicked
if <(letter) = [2]
say [Good Job!] for [3] secs
else
say [You got it wrong] for [3] secs
end
Offline
Maltese_Falcon wrote:
Maybe something like:
Assign a variable to each letter (A=1, b=2, etc), then:when bat clicked if <(letter) = [2] say [Good Job!] for [3] secs else say [You got it wrong] for [3] secs end
Messed up. Whoops!
Offline
Maltese_Falcon wrote:
Maltese_Falcon wrote:
Maybe something like:
Assign a variable to each letter (A=1, b=2, etc), then:when [bat v] clicked if <(letter) = [2]> say [Good Job!] for [3] secs else say [You got it wrong] for [3] secs endMessed up. Whoops!
Messed up again! Darn it!
Offline
Maltese_Falcon wrote:
Maybe something like:
Assign a variable to each letter (A=1, b=2, etc), then....
Can you please elaborate?
I would randomly select and display letter...
How would I assign a value to each letter? Do I need to create an array ahead of time?
I would then want randomly select a few sprites and have them move around the screen...
But then how do I setup the "when clicked...if... then" since they will be randomly selected.
Thanks for your time and thoughts.
Offline
Yeah, you could use a local variable on the sprites, maybe called Starts_With and assign it a value using a Green Flag script. Then, use a global variable to set what you are looking for, maybe called Looking_For. On each sprite you then put the same script that runs when the sprite is clicked and compares Starts_With to Looking_For and does things if they match.
Just define the local variable on one sprite - as you copy the script it will create the variable automatically in the other sprites. Good luck!
Offline