Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Create a Class
Old
xperiment229
Guest
 
Status:
Posts: n/a
Question Create a Class - 02-01-2006, 07:16 PM

How do I create a method for an object that will be stored in that object and be available next time I add that object

e.g.
Create a method for a penguin that will allow him to "kick" a ball
Store that method with the pengiun and have it available next time I add a pengiun to a world (not necessarily the same world)
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 02-01-2006, 11:32 PM

If you create an object-level method, you can then save out that object by right-clicking on its tile in the object tree and selecting "save object..." Then, when you want to use it, you can import it back into your world from the file menu. Just remember, if your object-level method references another object, like a ball, make sure that the ball is in your world PRIOR to importing the penguin. Otherwise, Alice will throw an exception.
   
Reply With Quote
Works Great
Old
xperiment229
Guest
 
Status:
Posts: n/a
Talking Works Great - 02-06-2006, 05:47 PM

Thanks a bunch. This is a new program to our college, and we all appreciate any assistance we can get on it. Thanks again.
   
Reply With Quote
Reply

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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.