Alice Community if/else_comparing user answer validity and providing result

 if/else_comparing user answer validity and providing result
charliebrownsmom
Junior Member

Status: Offline
Posts: 2
Join Date: Jun 2012
if/else_comparing user answer validity and providing result - 07-22-2012, 08:01 PM

I will try and explain my problem. I do not seem to be good at explaining.

I need to create a if/else to determine if the user's guess is incorrect/correct. I created a Boolean variable, and I set this Boolean variable as the users guess using the "ask user function yes or no."

I have tried numerous ways to get the Boolean to correspond with a word and an animal on the screen. I can get the if/else to either say correct or incorrect, but this isn't based on the actual correctness of the input.

I am uploading the program, so if anyone could steer me in the correct direction that would be terrific. I have searched these forums, but I cannot find an specific solution; and I followed all the tutorials on the Duke site.
Attached Files
 Spanish_Animal_Game_7_22_12_42k.a2w (1.08 MB, 4 views)

 Solution
 charliebrownsmom Junior Member   Status: Offline Posts: 2 Join Date: Jun 2012 Solution - 07-22-2012, 10:19 PM I have been working on this program for over 20 hours. I am weird it has been almost straight through. This solution came not after being intelligent enough to solve it through a process of cognition rather just hard headed trial and error. This post is to help everyone who has had a similar problem searched in vain and... OPACITY is the key. While I was using the Boolean, setting it to "ask user yes and no," setting it to true, taking the Boolean=true & animal = name, I gave no thought to the opacity of my animals or the opacity of my names. Hence setting the Boolean=true & animal.opacity=1 & name.opacity=1 will create a proper if/else which leads to the above being true. The animal and name opacity can be set up through their entirety to run the full logical scheme. So, when programming in Alice, be sure to look at opacity when objects are invisible.

 Tags boolean, ifelse

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge