Forum Discussion
Need expert advice on doing it as simply as possible.
I thought it might be simpler to solve using Javascript. If it is a simple solution i am not sure, but this is my approach for this anyway.
https://360.articulate.com/review/content/6a563e59-6fa5-4e46-880b-84306e82c324/review
This is the code that finally checks if all is correct or not on Submit.
let player = GetPlayer();
let code1 = player.GetVar("inputCode1");let code2 = player.GetVar("inputCode2");let code3 = player.GetVar("inputCode3");let code4 = player.GetVar("inputCode4");let code5 = player.GetVar("inputCode5");
let inputArr = player.GetVar("inputArray");
let showLayer = player.GetVar("showLayer");
//Here we check all entrieslet code1Correct = code1 == "sun" ? true : false;let code2Correct = code2 == "mon" ? true : false;let code3Correct = inputArr.includes("tue");let code4Correct = inputArr.includes("wed");let code5Correct = inputArr.includes("thu");
//if all are true... the answers are correctif(code1Correct && code2Correct && code3Correct && code4Correct && code5Correct){player.SetVar("showLayer",1);}else{player.SetVar("showLayer",2);}
Storyline added.
Related Content
- 11 months ago