Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Thread Tools Display Modes
Assignment 5
Junior Member
Status: Offline
Posts: 9
Join Date: Jan 2015
Default 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.
Reply With Quote
Status: Offline
Posts: 20
Join Date: Jan 2015
Default ITSE-1429_RL_Assign5_reply - 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
Reply With Quote
Try Experimenting
Senior Member
MrMoke's Avatar
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Try Experimenting - 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.
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.