%pos and %obj are both valid.
My code snip.
InitContainerRadiusSearch(%pos, 4, $TypeMasks::FxBrickAlwaysObjectType | $TypeMasks::FxBrickObjectType);
while ((%targetObject = containerSearchNext()) != 0)
{
echo("-------------------------");
echo(%targetObject);
if(%targetObject.getName() $= "_test")
echo("Test brick");
%coverage = calcExplosionCoverage(%pos, %targetobject, $TypeMasks::FxBrickAlwaysObjectType | $TypeMasks::FxBrickObjectType);
echo(%coverage);
if (%coverage == 0 || !miniGameCanDamage(%obj,%targetobject))
continue;
}
Here's a console log.
-------------------------
9074
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9070
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9071
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9072
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9073
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9064
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9261
Test brick
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9065
calcExplosionCoverage: object is on the client, or not in the container system
1
-------------------------
9063
calcExplosionCoverage: object is on the client, or not in the container system
1
The random number in the 9000 range is the brick's ID.
1 is the coverage, which, is always 1 if calcExplosionCoverage gets an error.
"Test brick" is a brick behind other bricks, so coverage is supposed to be 0.
Why am I getting this error?