Gonobob 1 Posted April 22, 2013 hi all, can anyone help me? sorry for bad english _building = nearestObject [player, "HouseBase"]; ---working and all next don't work if (!(isNull _building)) exitWith {cutText [localize "BUILDING", "PLAIN DOWN"];}; if (_building != objNull ) exitWith {cutText [localize "BUILDING", "PLAIN DOWN"];}; if (_building) exitWith {cutText [localize "BUILDING", "PLAIN DOWN"];}; how can i do exitWith when near building? thanks Share this post Link to post Share on other sites
Tankbuster 1746 Posted April 22, 2013 NearestBuilding might be better for you. It's a bit quirky - it doesn't find EVERY building such as the control tower building at Loy Manara, but other than that it's pretty reliable. I use it in my IED script to decide if it's in an urban or rural environment. more than 45m is considered rural. Share this post Link to post Share on other sites
Gonobob 1 Posted April 22, 2013 thanks mate, i did it _building = nearestBuilding player; _distance = player distance _building; if( _distance < 100) exitWith {cutText [localize "str_player_32", "PLAIN DOWN"];}; Share this post Link to post Share on other sites
killzone_kid 1331 Posted April 22, 2013 !isNull _building should work Share this post Link to post Share on other sites
Gonobob 1 Posted April 22, 2013 !isNull _building should work i tried this, didn't work( Share this post Link to post Share on other sites
killzone_kid 1331 Posted April 22, 2013 strange because it works for me. Share this post Link to post Share on other sites