Reply To: Maze task

PennController for IBEX Forums Support Maze task Reply To: Maze task

#5790
Jeremy
Keymaster

Hello Susanne,

Unfortunately you cannot use a Selector element from PennController to modify the behavior of a controller like Maze that was designed for Ibex. The code you posted will execute the maze and, once the whole sentence has been read or a wrong word has been selected (ie once your first wait command has been released), the script will then reach the Selector element and wait for its completion. So as you can see they are two distinct elements. (you also shouldn’t use a Selector without adding any element to select, but that’s a different issue)

I looked at the code for Maze (in Maze.js) and the e/i keys are hard-coded there, so if you want to use this controller you’ll need to edit the code. It’s not very complicated: replace the two occurrences of 69 with 37 and the two occurrences of 73 with 39. You’ll also want to replace

this.larrow.html("e");
this.rarrow.html("i");

with

this.larrow.html("←");
this.rarrow.html("→");

Oh and simply delete the file sample.js that comes with the repo, or overwrite its content with your own code.

Let me know if you have questions

Jeremy