Line2.lv Posted December 22, 2014 Report Share Posted December 22, 2014 Hi guys! I know how to make script that does not allow to build in certain areas, but how to make following: I want to disable building near (500 m radius) certain building objects all around the map. Such building objects like Land_A_BuildingWIP, Land_A_Hospital, Land_A_Office01 and other good looting places. Can somebody please give me a script example. Link to comment Share on other sites More sharing options...
0 calamity Posted December 22, 2014 Report Share Posted December 22, 2014 Hi guys! I know how to make script that does not allow to build in certain areas, but how to make following: I want to disable building near (500 m radius) certain building objects all around the map. Such building objects like Land_A_BuildingWIP, Land_A_Hospital, Land_A_Office01 and other good looting places. Can somebody please give me a script example. this may help I like the idea so I am working on it now something like this Idea example credit to _playerpos = getPosATL player; _nearObject = count nearestObjects [_playerpos, ["Land_A_BuildingWIP", "Land_A_Hospital", "Land_A_Office01"], 500] > 0; if (_nearObject) then { canBuild false; } else { canBuild true; } or something like this maybe _playerPos = getPosATL player; _nobuild = count nearestObjects [_playerPos, [""Land_A_BuildingWIP", "Land_A_Hospital", "Land_A_Office01""], 500] > 0; if (_nobuild) then { canbuild = true; else canBuild =true; Link to comment Share on other sites More sharing options...
0 GZA Posted December 22, 2014 Report Share Posted December 22, 2014 Calamitys first example should work. We use this: Go in player_build.sqf and add: //Forbidden Buildings _isNear = count (nearestObjects [player, ["Land_A_BuildingWIP", "Land_A_Hospital", "Land_A_Office01"], 500]); if(_isNear > 0) then { _cancel = true; _reason = "It is forbidden to build in/near this Building."; }; below: // No building in trader zones if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; }; calamity 1 Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Report Share Posted March 10, 2015 Calamitys first example should work. We use this: Go in player_build.sqf and add: //Forbidden Buildings _isNear = count (nearestObjects [player, ["Land_A_BuildingWIP", "Land_A_Hospital", "Land_A_Office01"], 500]); if(_isNear > 0) then { _cancel = true; _reason = "It is forbidden to build in/near this Building."; }; below: // No building in trader zones if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; }; What is the distance from the buildings that is prohibited? Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 500m "Land_A_Office01"], 500]); Link to comment Share on other sites More sharing options...
0 calamity Posted March 10, 2015 Report Share Posted March 10, 2015 500m "Land_A_Office01"], 500]); SchwEde, where you a 10th mountain division member ??? your name looks familiar. Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 nope i was not, maybe you know me from opendayz ;) Link to comment Share on other sites More sharing options...
Question
Line2.lv
Hi guys!
I know how to make script that does not allow to build in certain areas, but how to make following:
I want to disable building near (500 m radius) certain building objects all around the map.
Such building objects like Land_A_BuildingWIP, Land_A_Hospital, Land_A_Office01 and other good looting places.
Can somebody please give me a script example.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now