Hello all,
I'm working on a sugarcube game where the goal is to provide a "quiz arena." In this arena, I'd like the player to be asked random questions, have to answer them before moving on, and have those answers checked one at a time. To do this, I created an object in my StoryInit passage:
<<set $arenaobjects to {
Questions : {
q1 : "What is the first class in session 1?",
q2 : "How many computer classes are there during session 2?",
q3 : "How many students are in Reading 4 during session 1?"
}
Answers : {
a1 : "Writing" or "writing",
a2 : "4" or "four" or "Four",
a3 : "12" or "twelve" or "Twelve"
}
}>>
I thought about doing this as two arrays instead of two object properties within $arenaobjects, but I'm not sure if that would be better or worse.
The end result I'm trying to achieve is to have a tile display a random question and a textbox, and then know which answer to expect in that checkbox, based on which question was displayed at random. I've worked the above into the StoryInit tile, but am not sure which direction to go in to print the question and corresponding answer at random.
Comments
https://twinery.org/forum/uploads/Uploader/66/2771d41f65074ee628a5e56ecf7c33.html
When I simply load your example, however, it runs just fine. There must be something in my StoryInit tile that's creating interference. Any ideas?
Thanks again.
I played things through and not only was I receiving errors on the Quiz Bowl, but my cached sound wasn't coming through and there were other errors as well. I removed that line from the StoryInit tile and everything works perfectly.
Thanks so much, once again.