Alice Community  

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

Reply
 
Thread Tools Display Modes
Need assistance Chapter 3 Execise 7. Snowman to Stool
Old
kjobrien
Guest
 
Status:
Posts: n/a
Default Need assistance Chapter 3 Execise 7. Snowman to Stool - 06-23-2010, 02:09 PM

7. Snowman to Stool
This eexecise uses a number function as the count for a Loop. Create a world with a snowman and a stool, as seen below. Use a Loop to make the snowman (People) move to the Stool (Kitchen), one meter at a time. Use a distance to function to determine the number of times the loop repeats. (The distance to function might return a fractional distance such as 3.75 meters. The Loop statement truncates the fractional number to the interger 3 and will repeat three times.) We recomend that you test your solution by moving the snowman and the stool to diffrent locations on the screen and running the origram with each change, so you can know wheather it works no matter where the snowman and the stool are located.

This world is what I have to far I know how to change the number of time the loop is executed what I dont know how to do is make is stop when the snowman gets within a certian distance to the stool I have tried drgging in diffrent functions and tried makeing some more compicated loop nothing I do works please help Thank you all so much
Attached Files
File Type: a2w 7. Snowman to Stool.a2w (173.4 KB, 73 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-23-2010, 04:21 PM

Ah. Click the snowman to select it, then click the functions tab. The third available function, "snowman distance to" is the one you need.
   
Reply With Quote
Tanks but one more thing
Old
kjobrien
Guest
 
Status:
Posts: n/a
Default Tanks but one more thing - 06-23-2010, 04:30 PM

The example says I have to use a loop in my solution, so I added one I included the updated one how do I make the snow man stop short to avoid the colision in there with that loop now? Thanks for your help
Attached Files
File Type: a2w 7. Snowman to Stoolv2Loop.a2w (166.5 KB, 89 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 06-23-2010, 05:11 PM

That's a problem of center points. Try substituting stool's width + snowman's width for the number 1 in your loop.
   
Reply With Quote
Thanks
Old
kjobrien
Guest
 
Status:
Posts: n/a
Thumbs up Thanks - 06-23-2010, 07:56 PM

I was trying to was but unsuscessful trying to drop those funtions into the spot where the 1 was for the number or f loops. Now that thanks to you alll I nkow know I can drop stuff in there and it makes alot more sensce 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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.