Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Thread Tools Display Modes
Junior Member
Status: Offline
Posts: 8
Join Date: Aug 2014
Default Assign4-TT - 09-23-2014, 05:01 AM

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?
Attached Files
File Type: a2w Assign4-TT.a2w (762.5 KB, 3 views)

Last edited by thien; 09-23-2014 at 05:54 AM.
Reply With Quote
A Little Different
Senior Member
MrMoke's Avatar
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default A Little Different - 09-23-2014, 11:17 AM

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 Boolean function, parameters can be passed into it, it rolls through some logic, and returns a true or a false.
Reply With Quote
Senior Member
RavenOfCode's Avatar
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default Functions - 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?

Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
Reply With Quote
Junior Member
Status: Offline
Posts: 11
Join Date: Sep 2014
Default 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.
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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.