Tim_D
April 27, 2020, 2:52pm
1
I figured out how to have someone enter a number to satisfy a condition to make something happen. For example, once they put in the proper number code here, they get access to a key.
How do I do this where they enter a word to satisfy a condition? For example, enter a keyword to open a door.
Thanks
2 Likes
this is really cool! Can you make it remixable so I can check out your code?
1 Like
Tim_D
April 28, 2020, 4:47am
3
Done. Thank you for doing this.
1 Like
The easiest way is creating keyboard and I see that in your example you have already implemented 3d keys for all letters!
1 Like
Tim_D
April 28, 2020, 4:49pm
5
But it only works for numbers. Putting in the right number code opens the cabinet. I can’t get it to open if you put in the right alphabetic code.
1 Like
Tim_D
April 28, 2020, 5:27pm
6
I made a converter, which takes the letter keys and assigns a number to them, and that works, but why doesn’t the alpha work?
Thanks
1 Like
The alpha doesn’t work because you compare the variable with string literals with “2”. If you change the comparison to string with letters, it would work
1 Like
Tim_D
April 29, 2020, 2:50pm
8
I know there is a 2 in there. I can’t change it to anything alpha. It keeps reverting to my previous entry of 2.
1 Like
You can take a string block from the “Data” category and then you will be able to edit the string:
1 Like
Tim_D
May 5, 2020, 3:15pm
10
That does it. Thanks so much!
1 Like
Tim_D
May 5, 2020, 3:16pm
11
My only other issue is that students sometimes mistype their names, and have to start over. How can I have a reset button reset the string? Thanks.
You could add a © button that sets the entered string to “”
1 Like
Tim_D
May 6, 2020, 11:40pm
13
I tried, but it didn’t work
Thanks
1 Like
I have changed the resetting strings code and now it works:
Please, feel free to remix the updated project here:
1 Like
Tim_D
May 13, 2020, 9:00pm
15
Thank you! That did it! Good job.
https://edu.cospaces.io/AYB-QRK
1 Like
Thanks for the comments from everyone, I also tried it and felt happy to learn more from everyone, thank you very much.
1 Like
About this, may you do a tutorial or something? I am really confused.
1 Like