View Full Version : Assignment 5

02-20-2015, 05:32 PM
Hello again, This is a great program to learn on. I had fun using all the function and making variables in Alice 2.4. The if/else statement is nice a does drive the story. I also played with the dummy camera.

02-21-2015, 01:56 PM
I played with the camera a lot on the lab assignment. The camera is a pretty powerful tool to use.The only thing I don't like about the if statements is that you have to have an else statement. In other languages, that not the case. Else is optional. A lot of times in Alice, I used Nested if Statements. In the next version of Alice, I hope they included a switch statements. If you are only manipulating one variable, then you should use a switch statement over an if statement.

Switch(int a){
case 1: // a = 1 then code happens
case 2: // a = 2 then code happens
code ;
default: // a != 1,2 then code happens

02-21-2015, 11:21 PM
Alice2 scripting contains an if-elif-else that serves essentially the same functionality that you describe in your use of the switch(). For fun, Do a little research on Jython coding, and build a callable script that mimics the functionality.