So, I'm trying to build a script that will display the dimensions of a certain object. It seems simple enough, however the catch here is that the object in question will not be declared into the mission and will be NULL.
So I implemented the following script for the given purpose but I am not getting the correct results. I'm getting 0 s' no matter what object I form reference to.
_objname = "I_MRAP_03_F";
_box = missionNamespace getVariable[_objname, objNull] ;
_box_dim = boundingBoxReal _box ;
_p1 = _box_dim select 0;
_p2 = _box_dim select 1;
//systemChat format["%1,%2,%3", _p1 select 0, _p1 select 1, _p1 select 2];
_maxW = abs ((_p2 select 0)- (_p1 select 0));
_maxL = abs ((_p2 select 1)- (_p1 select 1));
_maxH = abs ((_p2 select 2) - (_p1 select 2));
systemChat format["width: %1", _maxW];
systemChat format["length: %1", _maxL];
systemChat format["Hidth: %1", _maxH];
I'm guessing that because the object in question (in this case a HEMPT truck) is not declared into the mission itself, its dimensions will return all zeroes? Any suggestion on how to fix?