Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How do I end/break loop?
Old
hydude777
Member
 
Status: Offline
Posts: 25
Join Date: Apr 2011
Default How do I end/break loop? - 02-14-2012, 07:53 AM

For example, if A is chasing B(moving and turning in infinite loop)

and A touches B, how do I end/stop the B's movement?
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 02-14-2012, 01:50 PM

Use a while loop instead.

For example

Code:
WHILE {"A" is at least 1 meter from "B"}

A move toward B at 5 meters per second

Do whatever else

END


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
hydude777
Member
 
Status: Offline
Posts: 25
Join Date: Apr 2011
Default 02-15-2012, 06:35 AM

It worked!! thanks!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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