Alice Community  

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

Reply
 
Thread Tools Display Modes
Hi, I am new here and i have been using Alice for simple programs for my class.
Old
urmotherlikesalice
Guest
 
Status:
Posts: n/a
Question Hi, I am new here and i have been using Alice for simple programs for my class. - 05-19-2010, 04:24 PM

I need help with making a function so that one object moves to another but does not collide with it. I started with alice like 2 months but i havent learned a great deal in class. I have to do this assignment but i do not know what i should do. I am supposed to make a functions as it is our requirement but i know that i can use the object for it. Like i have to make the alien move to a ball when i press "T". It should not collide with it. stop right before. What should i do. I know i need to to use the circumfrence of the circle(aliens' wheels) and subtract some distance. PLZ Help!!
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 05-23-2010, 07:01 AM

Are you saying you can like walk through it or you just move to far to it. Will to stop you from going through it if your using say a rangdom guy2. make a method in the methods tab. Have it say collision. What you do is in the folder area where you put all the move to, say, turn, roll. put in a randumguy2 move backwards 1 meter duration 0 seconds. That with make a collision methods for the rest. Make a world event "when the world starts" make a if else statement. Just pick true or false doesn't matter. Put it in the world folder then put the random guy 2 collision in the if else statement the if part (top) either have this in world starts or just add it into the when the world starts method. Now just go to the random guy 2 functions and add a [randon guy 2] is within [threshold] of object. Set it to the ball or what ever set how far so you cannot go through and collision.

Move to the ball set another object like a cone vehicle it to the ball and say alien move to cone that way you dont enter it. As for the wheels are you saying you want to resize them making them bigger or smaller?


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.