alice-teacher Alice 3 - Changes to a model with code

Margaret Meijers mmeijers at gmail.com
Mon Nov 9 22:05:05 EST 2015


Thanks Don.  That wasn't quite what I wanted to do, but it was enough to
set me in the right direction, and I've worked it out now.
What I was trying to do (and probably didn't explain properly!) was change
the clothing on a newAdult or newTeen (ie one of the Sims people) in Alice
3.
The people models all have the setResource procedure available as a code
block, but it just wouldn't let me use it in the code.  I now realise that
I first need to set a Scene Property from the gallery first, then I can use
the setResource procedure.  That then means I can put new trousers on a
person, or a different hat etc.

Thanks again
Margaret

On Tue, Nov 10, 2015 at 12:42 AM, Don Slater via alice-teachers <
alice-teachers at lists.andrew.cmu.edu> wrote:

> It depends on the model… Alice 2 models are built by combining a set of
> sub-parts (or objects) together to form the complete model. Because of
> this, each sub-part has its own set of properties that can be manipulated,
> without changing the properties of the other sub-parts. However, Alice 3
> models are built around a single skeleton, using sets of joints. This
> allows for more realistic animation for the model, and also better supports
> an inheritance structure for teaching Java and object-oriented programming.
>
> Therefore, it is not possible to change the color of the Mad Hatter’s hat,
> as it is not a separate object.
>
> However, there are some models that have different forms, such as the
> YetiBaby.  In the gallery, the YetiBaby has three forms, the default form,
> one with a scarf, and another with a tutu.
>
> If in your animation you wanted to put the scarf on the yeti, you would
> use the models setYetiBabyResource procedure. See the Attached screen shot.
>
> Let me know if you have any questions.
>
> All the best,
> Don Slater
>
> Alice Team
> Carnegie Mellon University
> Entertainment Technology Center
> 700 Technology Drive
> Pittsburgh, PA 15219
>
> Email: dslater at cmu.edu
>
> I have learned this at least by my experiment: that if one advances
> confidently in the direction of his dreams, and endeavors to live the life
> he has imagined, he will meet with a success unexpected in common hours.
> --- Henry David Thoreau
>
> The true object of all human life is play. -- G.K. Chesterton
>
>
>
>
> On Nov 7, 2015, at 5:21 PM, Margaret Meijers via alice-teachers <
> alice-teachers at lists.andrew.cmu.edu> wrote:
>
> Is it possible to use code to change a model's appearance as an animation
> runs?  eg could I code a different hat to appear on a model during an
> animation, and if so, how would I do it?
>
> Thanks
> Margaret
>
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
>
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20151110/84a9c0bd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setResource.png
Type: image/png
Size: 134728 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20151110/84a9c0bd/attachment-0001.png>


More information about the alice-teachers mailing list