Alice Community  

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

Thread Tools Display Modes
Programming Project 3.9 in Alice
Junior Member
Status: Offline
Posts: 1
Join Date: Oct 2011
Default Programming Project 3.9 in Alice - 10-06-2011, 02:07 PM

Here is the assignment:

Write a wizard method castChangeSizeSpell (obj, newSize), that takes an object obj, raise his arms, say a magic word or phrase, and then lower his arms. The method should resize obj the amount specified by newSize, and then make certain obj is standing on the ground. Create a scene 3 in which the wizard uses the castChangeSizeSpell() message to defeat the trolls by shrinking most of them to 1/10 their original size.
I have the wizard and a few trolls on the screen and I'm completely stumped of what to do next...
Reply With Quote
Senior Member
TauTrumpsPi's Avatar
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 10-06-2011, 02:46 PM

Try something similar to this

Method: castChangeSizeSpell
Parameters: (Target)

(Put something with the wizard waving his arms here if you want, I assume you know how to do that)

(target) set size to .1

(target) move down distance to ground - 1/2 (target)'s height

I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?

Wondering about my username?
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.