Alice Community

Alice Community (
-   The Lounge (
-   -   Assign4-TT (

thien 09-23-2014 05:01 AM

1 Attachment(s)
This assignment is not difficult, however it's a little time consuming. My character is a tiger. He walks from the left of the screen to the middle, greets his audience, then starts singing. At first I have him jump at random heights during the same song, however after re-reading the instruction, I made him jumps at the same randomly set height throughout the whole song. I'm much more comfortable working with parameters and variables now. Again, making him walk is still the most tricky part. I did not make him a stage, poor tiger!

By the way, does anybody know exactly what is the difference between functions and methods in Alice?

MrMoke 09-23-2014 11:17 AM

A Little Different
They both contain code that does something. The main difference is that Functions return a value "Type" that's pre-defined when it's created. Thus, if you create a [U]Boolean[/U] function, parameters can be passed into it, it rolls through some logic, and returns a true or a false.

RavenOfCode 09-23-2014 07:49 PM

Functions return a value, methods do stuff, functions are not seen on the screen they are back round process's that process and give us information such as "is the monkey blue". However methods are seen, they perform an action, such as "moving an object".

Does that clear it up?

relliott44444 09-24-2014 08:08 AM

In answer to your question, a function returns a some item to the caller (the return item may be an object too). A method, in contrast performs a defined capability for the object.

All times are GMT -5. The time now is 03:15 AM.

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