Alice Community Project 6 If/Else statements

 Project 6 If/Else statements
Anaxaragos
Junior Member

Status: Offline
Posts: 2
Join Date: Mar 2020
Project 6 If/Else statements - 03-11-2020, 01:50 PM

A common exercise is teaching someone a new language is to show the person familiar objects and ask for the word for that object. In this exercise, you are to write a simple vocabulary builder to help someone learn the Spanish word for cat. The scene shows a cat sitting on the grass and three Spanish words (3D text) displayed in front of the cat. The user is expected to click on the correct Spanish word for cat. A click on any other object will not work and causes the cat to shake his head "left to right", "right to left" indicating that the choice was incorrect).. If the user clicks on "gato" the cat will say "Si Si" with no head shaking.

Write a function (isGato) that returns true if the word (a 3D text object) selected is "gato" and false otherwise. Add a congratulation billboard after the correct word is chosen. Change the opacity of the false word so that it is no longer visible. The function will use one parameter (objectClicked) to send in the 3D text word clicked by the user.

Hints:
For this project, you only need to create:
One Event,
One Method (with IF/Else execution control and Boolean Logic)
Make sure to call the Boolean Function in your method
If you clicked anything other than the vocabulary words, the sitting cat should not shake his head
Attached Files
 Cat_Game.a2w (562.4 KB, 22 views)

 Anaxaragos Junior Member   Status: Offline Posts: 2 Join Date: Mar 2020 03-11-2020, 01:53 PM When I click on the "Gato" word the cat says "Si Si" and the "Congratulations" text appears as intended. When I click on the other 2 words "Perro" or "Toma" nothing happens but the cat is suppose to shake his head. Any help would be greatly appreciated!

 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 General Discussion     Questions and Comments     The Lounge