Alice Community  

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

Reply
 
Thread Tools Display Modes
How do I make it so a character keeps walking until it is within a certain distance?
Old
dragonmaster905
Member
 
Status: Offline
Posts: 15
Join Date: May 2012
Unhappy How do I make it so a character keeps walking until it is within a certain distance? - 05-27-2012, 08:57 PM

My method is as follows:
While cowboy is at least 5 meters from museum:
do walk method

If I am right, this should just keep on looping till the cowboy's close to the museum, right? Well, he just walks through the museum. Any help?
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 05-27-2012, 11:44 PM

Can you post the world?


[COLOR=e4eaf2]Your text here[/COLOR]
Come on, you know you want to try it.
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 05-28-2012, 12:22 AM

Quote:
Originally Posted by dragonmaster905 View Post
My method is as follows:
While cowboy is at least 5 meters from museum:
do walk method

If I am right, this should just keep on looping till the cowboy's close to the museum, right? Well, he just walks through the museum. Any help?
make the distance larger, Alice calculates distance from the center of each object, so in your case, it is measuring from the center of the cowboy to the center of the museum, so try to find the larger appropriate distance


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
dragonmaster905
Member
 
Status: Offline
Posts: 15
Join Date: May 2012
Smile 05-28-2012, 05:44 AM

Thanks sfunk! I'll try it! (oh and gamekid i'll post it if it doesn't work.)
   
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.