Inputting a set of numbers/letters

I have a student who wants their users to have to input a 5 digit code to move to the next scene. How would we code this? For example, the user must type in 12345 to go to Scene 2.

Hi @Kelly_Nickell,

There’s a couple of different ways to implement this:

  1. If you want the user to type the digits, you can use Javascript onKeyPress events to detect the digits and add/store them in a variable, then conditionally check the variable to see if it contains the correct digits.

  2. You can use 3D text objects to create a virtual keypad which a user can click, and use CoBlock onClick events to detect the digits, then store them in a variable/list.

  3. You can use a Quiz to detect whether digits are inputted in the correct order - see CoSpaces Edu :: Escape Room for an example.

Hope that helps! Let me know if you have any further questions about this. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

When Cospaces will have an equivalent to ASK in Scratch ?

Hi @ltarouco, I think it’s unlikely that @CoSpaces_Edu will implement this, as typing in AR/VR is difficult at best (unless you have voice as input). It also throws up a lot of design challenges for implementation.

However, I think it would be an interesting feature, and I suggest you create a new topic and submit this idea as a feature request.

You can have them input a code here