The Daily Click ::. Forums ::. Klik Coding Help ::. When two objects overlap, select one
 

Post Reply  Post Oekaki 
 

Posted By Message

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
23rd November, 2007 at 11:58:56 -

How do I do this?

When two objects overlap, I wanna select just one.

This is for an AI where slugs follow you. Sooner or later, multiple slugs will be overlapping, so I want to stop them when they overlap and leave just one moving.

 
191 / 9999 * 7 + 191 * 7

Willy C



Registered
  14/02/2004
Points
  1524

Game of the Week WinnerKlikCast StarPicture Me This -Round8- Winner!VIP MemberWii OwnerIt's-a me, Mario!Hero of TimeThe Cake is a LiePS3 OwnerI am an April Fool
Batman!Teddy Bear
23rd November, 2007 at 12:10:26 -

The simple way is like this:

When objects overlaps another object
+ Pick one of that object by random

Then it will pick one of the objects by random, if you want it to pick a more specific object, you gotta use a bit more advanced code

 
http://www.robocaptain.com

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
23rd November, 2007 at 12:17:47 -

Works, thankyou

I've tried the ones using special conditions before, but they didn't seem to work. Thanks for pointing this one out.

 
191 / 9999 * 7 + 191 * 7

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
23rd November, 2007 at 16:19:04 -

I find it odd that Dines is asking us for help not the other way around O_o

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click