Scan short answer for keywords
I am currently working on an assessment for a project. One of the questions require the learners to type in their response, however, the response needs to contain three keywords to make it correct.
What I have done:
1. I created two variables on storyline "quizanswer" and "res"
var player = GetPlayer();
var quizanswer = player.GetVar("quizanswer");
var resp = answer.match(/interacting|interdependent|unified whole/gi);
player.SetVar ("res", resp);
3. added a trigger to show correct if res != null and show incorrect if res = null
but it is not working.
Please help! :'(