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?
|
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 drive 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 03:25 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.