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

Plugin basics

LordManzana

New Member
Joined
May 2, 2015
Messages
207
Reaction score
0
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