Tankbuster 1746 Posted March 18 Guys, can anyone help? During mission start, I use this to find all the big buildings on each map. bighouses = (nearestTerrainObjects [[worldSize/2, worldSize/2], ["house", "tourism", "building", "hospital"], worldSize/sqrt 2, false, true]) select { ((count (_x buildingPos -1)) > 11) and (((str _x) find "pier_f") isEqualTo -1) and (((str _x) find "BIS_N") isEqualTo -1) and (((str _x) find "cargo") isEqualTo -1) and (((str _x) find "small") isEqualTo -1) and (((str _x) find "shop") isEqualTo -1) and (((str _x) find "hangar") isEqualTo -1) and (((str _x) find "scf") isEqualTo -1) and (((str _x) find "warehouse_02") isEqualTo -1) and (((str _x) find "warehouse_01") isEqualTo -1) and (((str _x) find "drydock") isEqualTo -1) and (((str _x) find "storagetank") isEqualTo -1) and (((str _x) find "addon") isEqualTo -1) and (((str _x) find "slum") isEqualTo -1) and (((str _x) find "crane") isEqualTo -1) and (((str _x) find "containerline") isEqualTo -1) and (((str _x) find "sy_01") isEqualTo -1) and (((str _x) find "multistorybuilding") isEqualTo -1) and (((str _x) find "hut_") isEqualTo -1) and (((str _x) find "ruins") isEqualTo -1) and ((_x call BIS_fnc_objectHeight) > 5.6) };// used when we need a large house with lots of positions, barricade defend etc. included barracks Problem is, it doesn't find the embassy on Cam_Lao_Nam. The object is a building as far as nearestTerrainObjects is concerned, and is within the radius of the position suppliled- - I've checked that. nearestterrainobjects pos is [10240,10240] and the radius is 14481. The embassy is actually 9100m away, so it's well within range It fits the other criteria in the code too, it's 33m high and has 55 buildingpos in it. The bighouses array is populated. On CLN it has 523 objects in it, but not the embassy in Saigon. Am I just killing the VM with the huge radius? Share this post Link to post Share on other sites
Tankbuster 1746 Posted March 18 Hmmm, further investigation; That script also finds all the hotels and the array does have one of the hotels in Saigon that is further from the centre position than the embassy. So I don't think it's distance or performance related Share this post Link to post Share on other sites
Tankbuster 1746 Posted March 18 OMG lol The embassy is (partly) 3686993: vn_embassy_01_02.p3d (((str _x) find "sy_01") isEqualTo -1) and OK, so I need to find out what I was trying to filter out with that string and improve the filter. I have a vague memory that it's something on Tanoa, maybe the piles of sugar cane or something similar. **edit** Yeah, it's all the Tanoa stockyard conveyors and stuff. OK, I need to improve that filter 1 Share this post Link to post Share on other sites
whiztler 137 Posted May 22 I would start with just the height with BIS_fnc_objectHeight. Does it find it then? If so, add one filter at the time. Share this post Link to post Share on other sites