Alice Community  

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

Reply
 
Thread Tools Display Modes
Help ASAP
Old
JMoney
Junior Member
 
Status: Offline
Posts: 1
Join Date: Feb 2018
Location: Baltimore
Exclamation Help ASAP - 05-16-2018, 07:23 AM

Good Morning! I'm finished my work in regards to what I'm doing (creating an interactive trivia game); however, I want to make the game work by creating a method or function that says when the user clicks on the correct answer, the program will say "Correct Answer" and when it is the wrong answer, it will say "Incorrect Answer". I've been trying to figure it out for DAYS and I'm so tired of working on it to the point where I need some help not because I don't know how to do it, but because I need some guidance on how to get this right. Once I get the correct/incorrect method going, I can finish what I want to do by putting in directions and doing a textual storyboard. Can any of you experts help me? Thanks! All I want is directions/guidance on how to put in a method that tells Alice that when you select the correct box, the program says correct to the user and verbatim for incorrect.

- JMoney
Attached Files
File Type: a2w FinalProject.a2w (105.4 KB, 3 views)
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 05-17-2018, 03:05 PM

Quote:
Originally Posted by JMoney View Post
Good Morning! I'm finished my work in regards to what I'm doing (creating an interactive trivia game); however, I want to make the game work by creating a method or function that says when the user clicks on the correct answer, the program will say "Correct Answer" and when it is the wrong answer, it will say "Incorrect Answer". I've been trying to figure it out for DAYS and I'm so tired of working on it to the point where I need some help not because I don't know how to do it, but because I need some guidance on how to get this right. Once I get the correct/incorrect method going, I can finish what I want to do by putting in directions and doing a textual storyboard. Can any of you experts help me? Thanks! All I want is directions/guidance on how to put in a method that tells Alice that when you select the correct box, the program says correct to the user and verbatim for incorrect.

- JMoney
OKay, First I changed the colors to match their labels and arranged the objects so I could see what was going on.
Next I changed the events to pass a string based on which "square" was clicked.
Then I wrote a function that compared that string to the "activeAns" string to see if it was correct.
All this seems to work OK now for one question, which I think is what you were asking for.
Mark
Attached Files
File Type: a2w finalProjv1.a2w (119.6 KB, 1 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Reply

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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.