alice-teacher Duplicating and instantiating objects

Vanderhyde, James vanderhyde at sxu.edu
Fri Feb 3 12:08:18 EST 2017


Reusing objects is the way to go. It’s what we had to do in regular programming in the “good old days” of static allocation.

James
—
James Vanderhyde
Assistant Professor, Computer Science
Program Director, Master of Applied Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454

On Feb 3, 2017, at 9:42 AM, Sharick, Edward via alice-teachers <alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>> wrote:

Thanks Don!

Yeah I suggested that as a work around. Having an array of 10 projectiles and then just cycling them through.

________________________________________
From: alice-teachers [alice-teachers-bounces+sharicke=tesd.net at lists.andrew.cmu.edu<mailto:alice-teachers-bounces+sharicke=tesd.net at lists.andrew.cmu.edu>] on behalf of Donald Slater via alice-teachers [alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>]
Sent: Friday, February 03, 2017 10:29 AM
To: Alice Teachers
Subject: Re: alice-teacher Duplicating and instantiating objects

I assume that that you are asking about Alice 3, as Alice 2 has the clone button in the mouse control tool bar in the upper right corner of the Scene Editor.

In Alice 3, you can duplicate objects by

       Windows OS: ALT key + mouse drag on the object.
       MacOS: CONTROL key = mouse drag on the object.

It is not possible to create more objects in Alice while the program is running. However, in your example, when a projectile disappears from the screen, you can reposition it to a starting point. Let me know if you would like more details.

All the best,
Don Slater

Alice Project
Carnegie Mellon University
Entertainment Technology Center
700 Technology Drive
Pittsburgh, PA 15219

Email: dslater at cmu.edu<mailto: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 Feb 3, 2017, at 9:59 AM, Sharick, Edward via alice-teachers <alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>> wrote:

Hi,

I was wondering if anyone knew of a way to duplicate an object that is already in the scene. I have a student who is designing a maze and wants to duplicate wall objects. He has to drag each individual piece from the bottom. Is there a way to copy an already instantiated object?

Likewise, is there a way to create an object while the animation is running. For example, if I were designing a space shooter game and wanted to create the projectiles as the user pushes the fire button and then destroy them as they leave the camera view, is there a way to do this.

Thanks,
-Eddie
_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu<mailto: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<mailto: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/20170203/8a63c89c/attachment.html>


More information about the alice-teachers mailing list