What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Plugin basics

LordManzana

New Member
Joined
May 2, 2015
Messages
207
Hello!

How can I get position of X object in radious of Y meters? I mean, for example, check all "Mushroom" near 50 meters, and get X,Y,Z. It's possible?
 
I didn't compile it to test, but this should work:

var doodList = getDoodads();
doodList.Sort((a,b) => a.dist(me).CompareTo(b.dist(me))); //sorts closest to me
foreach dood in doodList
{
if (dood.dist(me) <= 50 && dood.name == "Mushroom")
{
Log("Found: " + dood.name +" with X Coordinate: " + dood.X + " and Y Coordinate: " + dood.Y + " and Z Coordinate: " + dood.Z);
}
}
 
Back
Top