kvhollis Posted January 7, 2009 Share Posted January 7, 2009 I have a zone, with a character in that zone. I would like to be able to ask a series of questions, get the answer, check the answer, and then move on. I know how to ask a single question but I'm not too sure about a series of questions.... I have my suspicions and ideas however. Suggestions? Quote Link to comment
Ranger Fox Posted January 7, 2009 Share Posted January 7, 2009 You know where you check for the correct answer after the player enters something? You're probably using an if/then statement to tell the player if the answer is correct or not. In the section of code that tells the player the answer is correct, add another "Get input from player". Now go into the second input and add a similar if/then statement to check for a correct answer. If you want to add a third question, add another "Get input from player" in this section just as you did in the last input. Quote Link to comment
kvhollis Posted January 7, 2009 Author Share Posted January 7, 2009 You know where you check for the correct answer after the player enters something? You're probably using an if/then statement to tell the player if the answer is correct or not. In the section of code that tells the player the answer is correct, add another "Get input from player". Now go into the second input and add a similar if/then statement to check for a correct answer. If you want to add a third question, add another "Get input from player" in this section just as you did in the last input. I tried a different method initially - just getting the inputs in succession - it blew right past all but the last input and you could only answer that one. I learned something new. Thanks for helping this non programmer actually do a realatively simple task! If you only knew how I made it through Turbo Pascal and C++ in college, Ranger Fox, I'd certainly be embarassed! I just don't have that development mindset. Thanks again! Quote Link to comment
+TW-Team Posted January 8, 2009 Share Posted January 8, 2009 (edited) This is a common situation to ask different question in a single zone. You can use characters to ask your question. Here is a example (I used in the beginning with the builder): - activate your next zone - set a counter to the number of questions (3 as en example) - move your question-characters to this zone. - activate a question TASK if the player is near or enter the zone, explain what you expect from the player. - Show screen item screen (the player will now see your question-characters. The player can select which answer he or she would like to answer) - Each time a correct answer is given "if statement" you need to decrement you question counter and you should set you question-character to visible false. I hope you could follow the description so far. Now we need to test the exit condition. That means in our example we need to find out if the player has answered all three questions. This is again a simple task: - You need to create a TASK and you need to add your "if statement" (if the question counter equal 0) to the "task status change" Event. Of course you can/should add all the statements you need to activate the next zone, show detail screen xxx, etc, etc to move the game to the next stage within your if statement. - please remember to activate this TASK before you start asking your questions I hope this helps Edited January 8, 2009 by TW-Team Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.