Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Can't get quiz game to work
Posts: n/a
Default Can't get quiz game to work - 04-22-2011, 09:54 AM

Everything was going fine. I made an object variable called "correctAnswer", and made it so that, at the start of each question, the variable sets its value to one of the answers (3D texts). I made four events for each of them, so that when a user clicks them, a method called "world.checkForCorrectAnswer" will be called. It consists of nested If/Else statements that check if the selected answer is correct. If the right answer is picked, "world.nextQuestion" should be called, but if not, the display text should say "Wrong!"

However, I cannot get this to work. I tried picking the wrong answer and saw no text. Please help! (Click below for the file)

Also NOTE that I have not finished the "Next Question" method, which is why I picked the wrong answer to test it.
Attached Files
File Type: a2w quiz game.a2w (70.0 KB, 18 views)
Reply With Quote

can't get quiz, game to work, if/else, quiz game

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.