<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Wow! Thank you Don Slater.</div><div><br></div><div>We appreciate the details.</div><div>-Susan</div><div><br></div><div><a href="http://srivas-computerlab.com">http://srivas-computerlab.com</a></div><div><a href="http://srivas-computerlab.com/spanish/spanish.html">http://srivas-computerlab.com/spanish/spanish.html</a><br><br>Sent from my iPhone</div><div><br>On Jul 26, 2013, at 8:38 AM, Don Slater <<a href="mailto:dslater@andrew.cmu.edu">dslater@andrew.cmu.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>It is not possible to dynamically create objects over and over again in Alice 2... I might suggest creating a set of cars, and when the set is empty, put in some sort of wait condition that allows traffic to clear from the queue...</div><div><br></div><div>The Alice 3 IDE also does not support dynamic allocation at this time, although it may in the future. However, if you import your Alice 3.1 project into NetBeans, it is possible to use Java for dynamic object creation.</div><div><br></div><div>Briefly:</div><div> </div><div>Instantiate the new object</div><div> Car c = new Car();</div><div><br></div><div>Set the cars vehicle to the scene</div><div> c.setVehicle(this);</div><div><br></div><div>You will then need to figure out where to position it and so forth. Perhaps you an object marker, carStartPos in the scene... Then</div><div> C.moveAndOrientTo(carStartPos);</div><div><br></div><div>I hope this helps...</div><div><br></div><div>All the best,</div><div>Don Slater</div><div><br></div><div><br></div><div><br></div><div>All the best,</div><div>Don Slater<br><br>Sent from my iPad</div><div><br>On Jul 26, 2013, at 9:26 AM, André Gustavo Schaeffer <<a href="mailto:andre_schaeffer@yahoo.com.br">andre_schaeffer@yahoo.com.br</a>> wrote:<br><br></div><blockquote type="cite"><div>
<div dir="ltr">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<div><font face="Times New Roman"><span class="hps">Hi all!</span></font></div>
<div><font face="Times New Roman"><span class="hps"></span></font> </div>
<div><font face="Times New Roman"><span class="hps">Is</span> it <span class="hps">possible to make</span> <span class="hps">the creation</span> <span class="hps">of</span> <span class="hps">dynamic</span> <span class="hps">objects in
an</span> Alice <span class="hps">world</span><span>?</span> </font></div>
<div><font face="Times New Roman"><span class="hps">For
example</span><span>,</span> <span class="hps">in a
simulation</span><span>,</span> <span class="hps">within a</span> <span class="hps">loop</span><span>, I want</span> <span class="hps">a car</span> <span class="hps">pass</span> <span class="hps">every 5</span> <span class="hps">seconds
</span>(or variable period of time) <span class="hps">through the</span> <span class="hps">screen.</span></font></div>
<div><font face="Times New Roman"><span class="hps">For each one, if they can’t go
ahead due some reason, they will have to wait in a queue (a <span class="hps">street intersection</span> <span class="hps">with a</span> <span class="hps">traffic light, for example).</span></span> </font></div>
<div><font face="Times New Roman">But I <span class="hps">don’t know</span> <span class="hps">how long the</span> <span class="hps">simulation</span> <span class="hps">will take</span><span>.</span> </font></div>
<div><font face="Times New Roman"><span class="hps">So</span><span>,</span> <span class="hps">I</span> <span class="hps">don’t know</span> <span class="hps">how many
cars</span> to <span class="hps">drag to</span> <span class="hps">setup</span> <span class="hps">the world</span><span>.</span> </font></div>
<div><font face="Times New Roman"><span class="hps">In</span> <span class="hps">Java</span> <span class="hps">there are</span> <span class="hps">methods</span> <span class="hps">for</span> <span class="hps">dynamic</span> <span class="hps">creation</span> <span class="hps">and
destruction</span> <span class="hps">of objects</span><span>,</span> <span class="hps">dialog boxes</span><span>,</span> <span class="hps">etc.</span><span>.</span> </font></div>
<div><font face="Times New Roman"><span class="hps">Is it possible to</span> <span class="hps">do this in</span> <span class="hps">Alice (version 2 or 3)
?</span><br></font></div>
<div><font face="Times New Roman"><span class="hps">Thank
you</span><span>!</span></font></div>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Arial'; COLOR: #000000"><br>Andre
Gustavo
Schaeffer<br><a href="mailto:andre_schaeffer@yahoo.com.br">andre_schaeffer@yahoo.com.br</a><br><a href="https://sites.google.com/site/andregustavoschaeffer">https://sites.google.com/site/andregustavoschaeffer</a><br></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>alice-teachers mailing list</span><br><span><a href="mailto:alice-teachers@lists.andrew.cmu.edu">alice-teachers@lists.andrew.cmu.edu</a></span><br><span><a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></span><br></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>alice-teachers mailing list</span><br><span><a href="mailto:alice-teachers@lists.andrew.cmu.edu">alice-teachers@lists.andrew.cmu.edu</a></span><br><span><a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></span><br></div></blockquote></body></html>