The Daily Click ::. Forums ::. Klik Coding Help ::. Following Closest Object..
 

Post Reply  Post Oekaki 
 

Posted By Message

b0z0



Registered
  29/06/2008
Points
  109
29th June, 2008 at 23:30:01 -

Hey, this is my first post here.. Been lurking this site for many years now but just got around to registering..
Anyway, the game I'm making has Zombies whom chase people.. Both which run on the bouncing ball built-in movement. The zombies are set to follow the people.. I figured it would just by default select the nearest person, but no. They'll be a person right next to them and they'll chase one on the opposite side of the level.

So I know I could use a giant invisible box as a detector and have it to whee if a person is in that box zombie will chase them.. But that ends up causing problems with getting id of the boxes when killing the zombies.. So I was wondering if theres any event that will tell the zombies to select the nearest person without any extra objects or anything and will work with multiple zombies and multiple people in a level at once..

Thanks in advanced!

Image Edited by the Author.

 
n/a

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
30th June, 2008 at 07:32:15 -

Without any extra objects or anything... if that means extensions too, I guess you wouldn't want to use the advanced direction object? Meh, sounds like that extension would do the job for me anyway...

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
30th June, 2008 at 09:23:18 -

b0z0, I have a distance formula I made that you can use to compare the distance of each victim from a zombie... but then you'd probably have to compare each one, and depending on the way you've made your game that might be out of the question. Of course, I suppose you could do a bit of fast looping... Sounds like a headache to me.

 

  		
  		

b0z0



Registered
  29/06/2008
Points
  109
30th June, 2008 at 19:26:34 -

No, I'm willing to use extensions.. I just don't want to use any extra active objects unless its absolutely necessary..
And Clayton, I'd love to that that distance formula.. If I do have to it for each object though then it is completely out of the question though.. There's usually about 200 or so enemies on screen at once.. =P

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
1st July, 2008 at 10:19:43 -

Oh dear, 200, that's what I was afraid of. I'll dig up the old thing and send it to you...

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click