Hi as i was upgrading my fishbot a bit i decided to instead of looking for the fishing bobber directly in the function where all the GameObjects get's dumped i decided to rewrite some of it to make it return an array of Gameobjects here goes:
first we make a List where we can put all our gameobjects in
Code:
List<GameObject> _GameObject = new List<GameObject>();
here's my gameobject struct that im currently using
Code:
public struct GameObject
{
public float X;
public float Y;
public float Z;
public ulong GUID;
public uint BaseAdress;
public override string ToString()
{
return string.Format("X:{0}, Y:{1}, Z:{2}, GUID:0x{3:X016}, BaseAdress:{4:X08}", X, Y, Z, GUID, BaseAdress);
}
then after we got ewrything we want in our loop or w/e ure using to get objects we declare a new GameObject.
Code:
GameObject curObject = new GameObject();
curObject.X = X;
curObject.Y = Y;
curObject.Z = Z;
curObject.GUID = cGUID;
curObject.BaseAdress = curObj;
now curObject contains all info i want for the current object in the list then we add it to the List<GameObject> _GameObject
Code:
_GameObject.Add(curObject);
and finally at the end of our function we declare an array of gameobjects, same size as the list is and then return it.
Code:
GameObject[] list = new GameObject[_GameObject.Count];
_GameObject.CopyTo(list);
return list;
hope this help's someone. and thx Shyn'd for your wonderful Journal it helped me alot :wave:
Edit: btw this is in c# but i hope evrybody reading this understand's that