Alice Community

Alice Community (
-   How do I...? (
-   -   how to use the loops and if/else conditions? (

glaze 09-09-2005 01:01 AM

how to use the loops and if/else conditions?
hi, :o
my school, iligan capitol college, is probably the first school in the whole philippines or asia that teaches alice. but sad to say our teacher often left us by ourselves, neglecting to teach us the basics.
we do have a hard time using the if and else conditions, the do while loops, do together, do in order, etc.
could you please give me some hints or some infos how to use them?
could you give me some informations on how to create a game or story?
my classmates and i are very interested to learn more about alice but we lack informations.
thank you very much!


kingsamses 09-09-2005 04:00 PM

If/Else: This will execute code depending on wether a certain condition is met. Like this:
This code will move the camera forward .5 meters if the variable "number" is greater than two, and backwards if the variable is not greater than two. If the code was executed, the camera would move back.

Do while: This will repeat code until the given condition is not true.
This will increase the value of the variable "number" and then wait for one second, repeating until [i]number[/i] is not less than five, then turn the camera.

Do together: This will execute multiple lines of code at the same time.
This will spin the camera and move it up at the same time.

Do in order: This will execute lines of code one at a time. This is primarily used inside Do Togethers.
This will spin the camera twice, over a two-second period. While the camera is spinning, the ground will change to red, then to blue.

glaze 09-21-2005 12:32 AM

thank you
sigh, bad thing we do not have internet in our lab room, it could have been better if we use alice and at the same time got a connection so that we can report bugs easily and we can be taught directly..
can you suggest a good story, just a simple one to create? :confused:

All times are GMT -5. The time now is 07:36 PM.

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