Alice Community

Alice Community (
-   How do I...? (
-   -   Stopping a moving object with a switch (

Mac1357642 08-02-2020 01:33 PM

Stopping a moving object with a switch
I'm trying to make a stop moving when the mouse clicks the red button. I got it to drive when the green button is clicked but can not get it to stop with the red button. It just finishes it's rotation of the track. Can anyone help?

djslater107 08-03-2020 12:29 PM

Using a Boolean variable to control action
Create a boolean world variable, set it to false, and name it something like isActive.

You probably have a while loop controlling the drive around the track. That loop should be
while isActive

When you click on the green button set the isActve variable to true

When you click on the red button, set the isActive button to false

All times are GMT -5. The time now is 12:15 AM.

Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.