Alice Community Need help with loops and specifically for this world at this point
 User Name Remember Me? Password

 Thread Tools Display Modes
 Need help with loops and specifically for this world at this point
kjobrien
Guest

Status:
Posts: n/a
Need help with loops and specifically for this world at this point - 06-23-2010, 04:37 PM

Now I have the snowman moving twards the stool like he should be. My Question is how do I get the loop to stop when the snowman gets within a certian distance of the stool to avoid the collision. I can only put integers into the loop repeat slot how can i get alice to relize that the loop needs to stop before i collide with thte stool?
Attached Files
 7. Snowman to Stoolv2Loop.a2w (166.5 KB, 20 views)

 rich0e0rick Senior Member     Status: Offline Posts: 141 Join Date: Jan 2008 Location: Sturgeon Falls 06-24-2010, 03:43 PM can you not make something like this? Just make it that if the snowman is far enough away, move the snowman. -loop infinity --if (_snowman_) distance to (_target_) is ((_> than_) (_10_)) -----(_snowman_) Move towards (_target_) distance= 0.1 duration = 0.1 -- - change the 10 and the duration of the movement to whatever the distance needs to be. Remember that the faster the duration is and smaller the distance is, the more accurate the distance is going to be to the target, since it checks more often. im back!!! FINNALY!!! got windows working on my mac again!!!
 Thank you rich0e0rick
 kjobrien Guest   Status: Posts: n/a Thank you rich0e0rick - 06-24-2010, 04:13 PM That is exactly how I worked this one too and you are right with your reply it works perfect that way thanks for all you help Last edited by kjobrien; 06-24-2010 at 04:14 PM. Reason: speeling lol
 rich0e0rick Senior Member     Status: Offline Posts: 141 Join Date: Jan 2008 Location: Sturgeon Falls 06-26-2010, 02:01 PM no problem im back!!! FINNALY!!! got windows working on my mac again!!!

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge