PDA

View Full Version : Create a Class


xperiment229
02-01-2006, 08: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)

gabe
02-02-2006, 12:32 AM
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.

xperiment229
02-06-2006, 06: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.