This is for a quest that I'm making that'll require some work off JavaScript. I took some Code Academy lessons and figure out the basic languages. Here is what I input:
function puzzle1()
{
var switch1 = a;
var switch2 = b;
var switch3 = c;
var switch4 = d;
if(switch2, switch4, switch1, switch3 === true)
{
confirm("The chamber gives out a loud click, and the door unlocks!");
//Hidden door unlocks
}
else
{
confirm("The switches gave a surge, restarting the puzzle.");
}
}
puzzle1();
My objective with this script is to use it for a basic puzzle in a specific chamber. There will be 4 switches, and the user will have infinite opportunities to guess. It'll be out of order, but in a fixed order that the user won't know. It'll require all 4 switches to be active to determine whether the order is true or false. If false, the puzzle will reset and the user will have to retry.
If true, however, a door will open for the user and a break will occur within the loop, ending the scripts repeat and allow the actor to go onward. This order is perm, and won't random if starting a new game or load.
function puzzle1()
{
var switch1 = a;
var switch2 = b;
var switch3 = c;
var switch4 = d;
if(switch2, switch4, switch1, switch3 === true)
{
confirm("The chamber gives out a loud click, and the door unlocks!");
//Hidden door unlocks
}
else
{
confirm("The switches gave a surge, restarting the puzzle.");
}
}
puzzle1();
My objective with this script is to use it for a basic puzzle in a specific chamber. There will be 4 switches, and the user will have infinite opportunities to guess. It'll be out of order, but in a fixed order that the user won't know. It'll require all 4 switches to be active to determine whether the order is true or false. If false, the puzzle will reset and the user will have to retry.
If true, however, a door will open for the user and a break will occur within the loop, ending the scripts repeat and allow the actor to go onward. This order is perm, and won't random if starting a new game or load.