<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
I agree with Don’s solution. This works perfectly, and it is a good way to demonstrate to the students the usefulness of Boolean variables and logic. Pretty soon you start seeing logic everywhere.
<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>
<div><br class="">
<div class="">On Nov 9, 2017, at 3:36 PM, Donald Slater <<a href="mailto:djslater107@mac.com" class="">djslater107@mac.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Emily,<br class="">
One solution would be to create a Boolean variable for the Scene / World, maybe called isActive, with an initial value of true.<br class="">
<br class="">
In the event, create an if... statement<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>if (isActive)<br class="">
<br class="">
And then the work of the event would be inside the if statement code block...<br class="">
<br class="">
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 class="">
<br class="">
Let me know if you have any questions...<br class="">
<br class="">
All the best,<br class="">
Don Slater<br class="">
<br class="">
Alice Project<br class="">
<br class="">
Sent from my iPad<br class="">
<br class="">
<blockquote type="cite" class="">On Nov 9, 2017, at 2:29 PM, Emily Higgins <<a href="mailto:erphiggins@gmail.com" class="">erphiggins@gmail.com</a>> wrote:<br class="">
<br class="">
Hi All,<br class="">
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 class="">
<br class="">
Thank you very much,<br class="">
Emily Higgins<br class="">
STEM/Gifted and Talented<br class="">
Boothbay Region High School<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="">
To change settings or unsubscribe visit:<br class="">
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers<br class="">
</blockquote>
_______________________________________________<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="">
To change settings or unsubscribe visit:<br class="">
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers<br class="">
</div>
</div>
</div>
<br class="">
</div>
</body>
</html>