Alice Community  

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

Reply
 
Thread Tools Display Modes
HELP, I'm OBJECT frustrated
Old
bye-cycle
Guest
 
Status:
Posts: n/a
Default HELP, I'm OBJECT frustrated - 01-01-2009, 09:44 PM

I have been struggling for what seems like forever to figure this out, and I am tired of spinning my wheels. I have a ring that I am guiding a boat thru and I am unable to get my boat driver to realize that he has gone thru the ring. Basically it would seem that my Object (boat driver) does not sense the Object (ring). This was for a class assignment that was due quite a while back. But I'm not giving up till I figure it out.
The assignment is from "Starting Out with Alice" by Tony Gaddis, page 269 #6.
I will be more than happy to provide what I have done, or if there are some tutorials available I can study that would be kool also. Any help would be super.
Many thanks in advance!!!!!!
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 01-01-2009, 11:37 PM

You have to make sure the "Distance to" distances are correct. When you make a piece of code in Alice that says "Object 1 is X distance to Object 2", what this actually means is the exact center of Object 1 to the exact center of object 2. If you set the distance to zero, then that means the exact center of each object have to meet and EXACTLY touch each other. Try increasing the distances in the code.


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b
   
Reply With Quote
I had thought I had
Old
bye-cycle
Guest
 
Status:
Posts: n/a
Default I had thought I had - 01-03-2009, 09:03 PM

I setup -
If 'SkaterGirl.upperbody' is within '.25 meters' of 'object'
'status' set value to 'true'
Else
'status' set value to 'false'

I have set skaterGirl as 'vehicle = motorboat'.

I have even changed 'is within' to 1 meter and it did not help. I have added a print 'true' under the If and a print 'false' under the Else, the print is always false. I recieved the Solution from my teacher at school and when using the "print" in the Solution the the print is always false until skaterGirl passes thru the ring, then If will go true and the ring will go away. I have followed the Solution as exactly as I can, but I am still missing a simple step that gets skaterGirl.upperBody to recognize the ring.
skaterGirl has an object parameter and ring does not. I can click on the object in If 'SkaterGirl.upperbody' is within '.25 meters' of 'object' statement and it shows all the rings. So that is telling me that skaterGirl does see all the objects, but does not react when within the specified distance.
What else can I look at??
Again... thanks in advance
   
Reply With Quote
It's working
Old
bye-cycle
Guest
 
Status:
Posts: n/a
Default It's working - 01-04-2009, 02:15 PM

Based on what Chris101b had said I decided to experment and changed my "is within" distance to 5 meters and that worked. So I worked my way down. It seems .5 meters is the magic breaking point.

Thank you Chris101b !!!
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 01-04-2009, 08:07 PM

Glad I could help


I am nowhere and everywhere at the same time.

www.facebook.com/chris101b
Xbox Live GT: Chris101b
Youtube: (You guessed it) www.youtube.com/chris101b

Last edited by Chris101b; 01-04-2009 at 08:11 PM.
   
Reply With Quote
"is within" distance
Old
timsally
Guest
 
Status:
Posts: n/a
Post "is within" distance - 01-05-2011, 08:52 AM

Just a troubleshooting solution for people who may read this thread in the future...


The distance you will need to enter will be proportionate to the size of the world. I created a large world (beginner's inexperience with ratio of objects to world) and so an object was a few meters wide and therefore I had to set the "'is within' distance" to a larger number in order to have them react when their edges touched.

Tim S.
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.