Simple Overlay 2D private asking for a password

Trying to set up a kind of Escape Room in HighFidelity, I would like to have a very simple script that on touch will pop up privately an overlay with a simple text, usually a kind of question like:
“Enter key to open the door”
and having a simple textbox where the user can enter something like 12345
the script then checks for the exact key hardcoded and opens the door if this holds, otherwise, something else can happen.
I know that you can use Overlays 2D but need some examples to kick it running, so far the only examples I have are something from chat.js which are too complex and not easily reproducible. Ideally this would need only something like 10 java script code lines, or not?

Hi Claudio, you might want to ask here:

thanks will do… :slight_smile:

Sorry that responses are slow in coming. It’s a big holiday in USA.

actually they have replied and the sample working script is as follows, thanks to basinsky for his help.

(function () {
    var self;
    this.preload = function (entityID) {
         self = entityID;
    } 
    this.unload = function (entityID){
    }

    function click() {
        var answer = Window.prompt("Question", "answer");
        if (answer === "") {
            Window.alert("User canceled");
        } else {
             Window.alert("User answer: " + answer);
    }


    }

    this.startNearTrigger = click;
    this.startFarTrigger = click;
    this.clickDownOnEntity = click;
});
put this entity script in an entity
also look at https://apidocs.highfidelity.com/Controller.html and scroll to entity methods

does it mean that this forum is essentially dead? :frowning:

It is still here and has a treasure of information. But it is not used a lot. I’ll hope it will stay here. But for more activity you should use the discords