<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Don,</p>
<p>Could you send a code sample, preferably in Alice 2, showing an example of what you described here?</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Joel Caulum</p>
<p>Computer Science</p>
<p>Portage High School</p>
<p>Portage, WI</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> alice-teachers <alice-teachers-bounces+jcaulum=edgewood.edu@lists.andrew.cmu.edu> on behalf of Donald Slater <djslater107@mac.com><br>
<b>Sent:</b> Thursday, November 9, 2017 3:36:54 PM<br>
<b>To:</b> Alice educators<br>
<b>Subject:</b> Re: alice-teacher Alice 3 Event Listener Question</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">Emily,<br>
One solution would be to create a Boolean variable for the Scene / World, maybe called isActive, with an initial value of true.<br>
<br>
In the event, create an if... statement<br>
        if (isActive)<br>
<br>
And then the work of the event would be inside the if statement code block...<br>
<br>
You would set the isActive variable to false at the point in the program where the user should NOT be able to move the wolf.<br>
<br>
Let me know if you have any questions...<br>
<br>
All the best,<br>
Don Slater<br>
<br>
Alice Project<br>
<br>
Sent from my iPad<br>
<br>
> On Nov 9, 2017, at 2:29 PM, Emily Higgins <erphiggins@gmail.com> wrote:<br>
> <br>
> Hi All,<br>
> I have a problem.  How can I make an event listener stop working?  We have an event listener moving a wolf, and at certain point in the program, the user needs to NOT be able to move the wolf.  I can't figure it out.<br>
> <br>
> Thank you very much,<br>
> Emily Higgins<br>
> STEM/Gifted and Talented<br>
> Boothbay Region High School<br>
> _______________________________________________<br>
> alice-teachers mailing list<br>
> alice-teachers@lists.andrew.cmu.edu<br>
> To change settings or unsubscribe visit:<br>
> <a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a><br>
_______________________________________________<br>
alice-teachers mailing list<br>
alice-teachers@lists.andrew.cmu.edu<br>
To change settings or unsubscribe visit:<br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a><br>
</div>
</span></font></div>
</body>
</html>