Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Stop an object in motion with events (http://www.alice.org/community/showthread.php?t=5091)

AIM 09-26-2010 02:30 PM

Stop an object in motion with events
 
I'm going through the 'Starting out with Alice' textbook and reach an exercise where I have make the a car go around a circular track when you click a button, then stop in its place when you click a different button. However, I can't figure out to make the car stop :confused:

Anyone know a way to do this? I've read the Alice book through and through but can't find anything on it. I'm thinking I missed soething.

Thank you

debussybunny563 09-26-2010 04:41 PM

[SIZE="2"]Use boolean variables to control that.

Basically,
Events
When <key> is typed
--<world.variable> set value to <true>
When <other key> is typed
--<world.variable> set value to <false>
Method
While <world.variable>
--car.move

Upload the world as an attachment and I'll show you more specifically.[/SIZE]

AIM 10-26-2010 05:01 PM

I apologize for this response benig so late. I understood what you were saying and got it working thanks to you. The help was much appreciated! I hope you can excuse my delay though. I run on a rather busy schedule so late in the year and just now got time to get back around to this forum.


Thank you!
~Abe

debussybunny563 10-26-2010 05:03 PM

No prob
 
[SIZE="2"]Always welcome! :D[/SIZE]

suvadhun 10-30-2019 09:26 PM

ferriwheel stop and run
 
Hello,
thanks i found something about this code but will you please go to more details. thank you.
[QUOTE=debussybunny563;25829][SIZE="2"]Use boolean variables to control that.

Basically,
Events
When <key> is typed
--<world.variable> set value to <true>
When <other key> is typed
--<world.variable> set value to <false>
Method
While <world.variable>
--car.move

Upload the world as an attachment and I'll show you more specifically.[/SIZE][/QUOTE]


All times are GMT -5. The time now is 06:33 AM.

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