Author Topic: initContainerBoxSearch  (Read 1496 times)

Can someone explain in full depth initContainerBoxSearch and how to use it, I cant find anything on how to use it.

usage: (Point3F pos, Point3F boxSize, bitset mask)

e.g:
Code: [Select]
%position = %client.player.getPosition();
%boxSize = "32 32 32";
%mask = ($TypeMasks::FxBrickObjectType | $TypeMasks::PlayerObjectType);

initContainerBoxSearch(%position, %boxSize, %mask);
while(%searchObj = containerSearchNext())
{
   echo(%searchObj);
}

will search for bricks or players within a 32x32x32 box at the clients position.

Would the box be centered on the player? Or would it be, like, bottom left corner of the box?

That box would be centred on the player's feet.

Code: [Select]
initContainerBoxSearch(%position, %boxSize, %mask);
while (%searchObj= containerSearchNext())
{
   //do stuff to %searchObj
}
« Last Edit: November 28, 2008, 10:42:00 AM by Space Guy »

Thanks alot guys, I really needed to know how to work this.

Code: [Select]
%mask = ($TypeMasks::ClientObjectType);Would that work if i wanted to do somthing to their client, or would PlayerObjectType get their client?

There is no ClientObjectType, because client isn't a physical object. You'd need to use PlayerObjectType, or whatever it is, then when you get the player, use <player>.client for the client.