Rand_em_x_y_z 0 Posted December 15, 2017 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? Share this post Link to post Share on other sites
pierremgi 4910 Posted December 17, 2017 sizeOf "I_MRAP_03_F" will return 11.8862 // too big as usual getNumber (configfile >> "CfgVehicles" >>"I_MRAP_03_F" >> "mapSize") will return 6.55 // far better. Similar to highest value of boundingBoxReal of the object. Share this post Link to post Share on other sites