<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
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.
<div class=""><br class="">
</div>
<div class="">James<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor, Computer Science<br class="">
Program Director, Master of Applied Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
<br class="">
<div>
<div class="">On Feb 3, 2017, at 9:42 AM, Sharick, Edward via alice-teachers <<a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Thanks Don!<br class="">
<br class="">
Yeah I suggested that as a work around. Having an array of 10 projectiles and then just cycling them through.<br class="">
<br class="">
________________________________________<br class="">
From: alice-teachers [<a href="mailto:alice-teachers-bounces+sharicke=tesd.net@lists.andrew.cmu.edu" class="">alice-teachers-bounces+sharicke=tesd.net@lists.andrew.cmu.edu</a>] on behalf of Donald Slater via alice-teachers [<a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a>]<br class="">
Sent: Friday, February 03, 2017 10:29 AM<br class="">
To: Alice Teachers<br class="">
Subject: Re: alice-teacher Duplicating and instantiating objects<br class="">
<br class="">
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.<br class="">
<br class="">
In Alice 3, you can duplicate objects by<br class="">
<br class="">
Windows OS: ALT key + mouse drag on the object.<br class="">
MacOS: CONTROL key = mouse drag on the object.<br class="">
<br class="">
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.<br class="">
<br class="">
All the best,<br class="">
Don Slater<br class="">
<br class="">
Alice Project<br class="">
Carnegie Mellon University<br class="">
Entertainment Technology Center<br class="">
700 Technology Drive<br class="">
Pittsburgh, PA 15219<br class="">
<br class="">
Email: <a href="mailto:dslater@cmu.edu" class="">dslater@cmu.edu</a><br class="">
<br class="">
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.<br class="">
--- Henry David Thoreau<br class="">
<br class="">
The true object of all human life is play. -- G.K. Chesterton<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On Feb 3, 2017, at 9:59 AM, Sharick, Edward via alice-teachers <<a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a>> wrote:<br class="">
<br class="">
Hi,<br class="">
<br class="">
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?<br class="">
<br class="">
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.<br class="">
<br class="">
Thanks,<br class="">
-Eddie<br class="">
_______________________________________________<br class="">
alice-teachers mailing list<br class="">
<a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a><br class="">
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers<br class="">
</blockquote>
<br class="">
_______________________________________________<br class="">
alice-teachers mailing list<br class="">
<a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a><br class="">
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers<br class="">
_______________________________________________<br class="">
alice-teachers mailing list<br class="">
alice-teachers@lists.andrew.cmu.edu<br class="">
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers<br class="">
</div>
</div>
</div>
<br class="">
</div>
</body>
</html>