Alice Community  

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

Reply
 
Thread Tools Display Modes
Making a collision?
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default Making a collision? - 05-16-2011, 08:24 PM

Sorry if this sounds noobish.
I've seen lots of worlds with a collision code/method, but how do i create that? Is it a string? If yes, what's the coding for the string?
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 05-16-2011, 09:02 PM

It's actually very complicated. The best one I've seen is here: http://alice.org/community/showthread.php?t=3994


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
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-16-2011, 10:31 PM

well depending on the type of collision you want, it can be difficult, or even more difficult lol but if you are doing a very simple collision, you might be able to squeak by using just a simple if whatever is so far away from whatever, move however far away


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
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 05-26-2011, 08:04 PM

Sfunk, I know that, what i'm asking is; how?
Thanks tau, i'll try to use that, if all else fails.
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 05-26-2011, 08:37 PM

Quote:
Originally Posted by GameKid View Post
Sfunk, I know that, what i'm asking is; how?
Thanks tau, i'll try to use that, if all else fails.
Make a sphere and infinitely loop:

If (Thing to collide) is within (Sphere's width/2) of Sphere
(Thing to collide) move (Opposite direction in which it is currently traveling, use a variable that changes with you're movement command) (Exact speed at which the thing to collide is currently traveling)
Else
Do nothing



Just play that method with a parameter for the sphere and play the method infinitely for each sphere you have, and each thing you want to collide with it you have. Put the spheres, invisible, anywhere you want a collision to be, using many spheres placed correctly to make a different shape.


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 05-30-2011, 03:19 PM

I don't get it, which are the strings and which are the pre-listed? Can you post a screen shot?
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 06-13-2011, 10:20 PM

Bump. Please help, guys.
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.