Hi guys,
I'm creating a game with puzzles. On every passage you'll have clues and need to fill in a textbox with the correct answer to be able to continue forward to the next passage/puzzle.
I allready have the code that works for one specific answer. But I would like to like to have a little change so I can easily ad more correct answer for example.
If the correct answer is ''oakwood va clinic'' I would like that ''oakwood clinic'' and ''oakwood va'' is also the right awnser to proceed.
Hope you guys can help me!
this is my current code:
<<set $answer to ''>>\
<<textbox '$answer' '' autofocus>>
<span id='textbox-reply'></span>
<span id='textbox-submit'>\
<<button 'Send Intel'>>
<<set $answer to $answer.trim().toLowerCase().replace(/\s\s+/g, ' ')>>
<<if $answer is "oakwood va clinic">>
<<replace '#textbox-reply'>>\
Correct!\
<</replace>>
<<replace '#textbox-submit'>>\
[[Mission 3 Succeeded]]\
<</replace>>
<<run $('#textbox-answer').attr('readonly', 'true');>>
<<else>>
<<replace '#textbox-reply'>>\
Incorrect. Please try again.\
<</replace>>
<</if>>
<</button>>\
</span>