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