<div style="white-space:pre-wrap">I put a global Boolean to turn to false in the main method and then set up the event listener to have an if key pressed AND Boolean true, and that did not work.  <br>Emily</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 12, 2017 at 3:29 PM Joel Caulum <<a href="mailto:JCaulum@edgewood.edu">JCaulum@edgewood.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_-2959315668771811121divtagdefaultwrapper" 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%">
<div id="m_-2959315668771811121divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> alice-teachers <alice-teachers-bounces+jcaulum=<a href="mailto:edgewood.edu@lists.andrew.cmu.edu" target="_blank">edgewood.edu@lists.andrew.cmu.edu</a>> on behalf of Donald Slater <<a href="mailto:djslater107@mac.com" target="_blank">djslater107@mac.com</a>><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><div dir="ltr">
<div class="m_-2959315668771811121BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="m_-2959315668771811121PlainText">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 <<a href="mailto:erphiggins@gmail.com" target="_blank">erphiggins@gmail.com</a>> 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>
> <a href="mailto:alice-teachers@lists.andrew.cmu.edu" target="_blank">alice-teachers@lists.andrew.cmu.edu</a><br>
> To change settings or unsubscribe visit:<br>
> <a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a><br>
_______________________________________________<br>
alice-teachers mailing list<br>
<a href="mailto:alice-teachers@lists.andrew.cmu.edu" target="_blank">alice-teachers@lists.andrew.cmu.edu</a><br>
To change settings or unsubscribe visit:<br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a><br>
</div>
</span></font></div>
</div>

_______________________________________________<br>
alice-teachers mailing list<br>
<a href="mailto:alice-teachers@lists.andrew.cmu.edu" target="_blank">alice-teachers@lists.andrew.cmu.edu</a><br>
To change settings or unsubscribe visit:<br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers" rel="noreferrer" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></blockquote></div>