Alice Community  

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

Thread Tools Display Modes
Can Someone Please Help (School Project)
Junior Member
Status: Offline
Posts: 6
Join Date: Mar 2012
Default Can Someone Please Help (School Project) - 03-11-2012, 01:30 AM

okay so I am currently creating a "game". in this game a ball is under one of three domes. every time the location of the ball random.

I need the player of the game to be asked a question "Which dome is the ball under?" (1 2 or 3). have the player answer, and get a response of "correct" or "wrong". and then proceed to next level. but i dont know how to match up the random location of the ball with the correct answer of the question.

Can someone please help?
Reply With Quote
Senior Member
sfunk's Avatar
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 03-11-2012, 06:19 AM

please only post one thread about your issues, it is not necessary to post it all over the forums.

and for your help, well use a number variable located under the properties tab when you click on "World" in the object tree. there you can create multiple types of variables, the one you want to use is obviously a number variable. now you will need to use if/else statements.

so example...

if num_var==1
world say user wins
world say user lose

do this two more times.

now for this to work, you'll need to have that variable be set when the ball is under whatever dome, easy way to do it, have your animations and random number stuff happen, then at the end of that sequence, have your world determine where the ball is and have it set the number variable to that designated number determined by which dome it's under.

And since you are using a random position, I am guessing you know how to use number variables somewhat already, if that is how you are doing it, then what ever number is chosen by random should be the number var that determines the ball's position. hope this helps

If you are stuck on a project, check out the tutorials I made here at this link:

There are lots of tutorials on it so far, including some youtube videos, check it out


Go to my youtube channel to check out my alice 2.2 tutorials I have there..
Reply With Quote

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