easy stage-received user numerical input (NOT ask)

I'm trying to recreate the code.org Binary Tetris game on Snap. Going into Binary is easy, generate a random number and display it. And, because there's already a line of cloned 0s (costumes), you just click the necessary place values to 1s (when I am clicked, change costume). And when the place values match a predetermined order - corresponding to the random number generated at the beginning, they disappear.

However, going from binary to decimal - this is less easy. I can easily generate clones with appropriate costumes to represent a random binary number. However, anyone have ideas for an 'easy' way for a user to input the correct number?

I guess, I could have them click the appropriate place and enter via ask. But ask seems to defeat the purpose by slowing down the pace of the game. Because it's ask and wait.... and I want to keep the fast pace.

Any suggestions?

You could use the, when [] kay pressed or the <key [] pressed?> blocks to test if a user typed a number without using ask.

Or run a parallel script doing the asking at the same time as your main script is running

[edit] Alternate to avoid speech bubble

Additionally, they have it so if you put “any key” as the option in the event block, you get a parameter variable which is the key the user pressed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.