Well, you need to know the area to search. Here's how you find the minimum and maximum points of a player's collision box:
%boxMax = vectorAdd(%player.getHackPosition(),vectorScale(%player.getDataBlock().boundingBox,1/8));
%boxMin = vectorSub(%player.getHackPosition(),vectorScale(%player.getDataBlock().boundingBox,1/8));
Then you need to know where to start the search:
%pos = %player.getHackPosition();
Then you need to know the size of the box:
%width = mAbs(getWord(%boxMax,0) - getWord(%boxMin,0));
%length = mAbs(getWord(%boxMax,1) - getWord(%boxMin,1));
%height = mAbs(getWord(%boxMax,2) - getWord(%boxMin,2));
%box = %width SPC %length SPC %height;
Then you need to perform your search:
initContainerBoxSearch(%pos,%box,$TypeMasks::FXBrickObjectType | $TypeMasks::InteriorObjectType);
while (%checkObj = containerSearchNext())
{
//Add desired code here.
}
See? It's not that bad.