Im making a zork style game in HTML using javascript.
My game currently looks like this,
<script>
$(document).keypress(function(event) {
if (event.which == 13) {
$(".output").append("
Inside the append goes what part of the story you want to print. When the user inputs an answer, A/B/C, then it spits out an answer based on if then.
$(document).keypress(function(event) {
if (event.which == 97) {
$(".output").append("
Problem is it will spit out every single answer I have for that input. I need to find a way for HTML or JS to wait for input then continue on.
prompt()