[Release] Replace all Churches with enterble models

cyrq

Valued Member!
It's been a long time since I've posted any code here :p
Create a file called hide_churches.sqf
Code:
private ["_pos","_radius","_church1","_church2"];
 
while {alive player} do {
 
_pos = position player;
_radius = 1500; // meters
 
_church1 = (_pos nearObjects ["Land_Church_02", _radius]);
_church2 = (_pos nearObjects ["Land_Church_02a", _radius]);
{
    _x hideObject true;
} forEach _church1,_church2; 
};
Save it in you mission file.

Exec it via init.sqf:

Code:
[] execVM "hide_churches.sqf";
Next create a file called churches.sqf
Code:
if (isServer) then {
 
_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [12868.679, 10143.146, 6.8664551e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir 202.99477;
  _this setPos [12868.679, 10143.146, 6.8664551e-005];
};
 
_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [2740.5989, 5460.9292, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir -59.786922;
  _this setPos [2740.5989, 5460.9292, -1.5258789e-005];
};
 
_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [1733.084, 3826.0647, -0.60737413], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir -16.735952;
  _this setPos [1733.084, 3826.0647, -0.60737413];
};
 
_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [7415.3257, 5186.564, 6.1035156e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -132.3855;
  _this setPos [7415.3257, 5186.564, 6.1035156e-005];
};
 
_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [6030.6421, 7774.1265, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 216.2403;
  _this setPos [6030.6421, 7774.1265, 3.0517578e-005];
};
 
_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [2717.8699, 10040.454, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir 66.286537;
  _this setPos [2717.8699, 10040.454, -9.1552734e-005];
};
 
_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Church_03", [6186.1899, 10409.502, 0.3772566], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir 198.86404;
  _this setPos [6186.1899, 10409.502, 0.3772566];
};
 
};
Exec it via init.sqf (client side) or server_functions.sqf (server side)

Code:
[] execVM "churches.sqf";
/
Code:
[] execVM "\z\addons\dayz_server\init\churches.sqf";
or whatever you want it named or called from.



Not sure If i replaced all of them in the file above, so feel free to edit it or simply tell me. Also the azimuth and placement could be a bit better, but the 3DEditor makes me wanna punch my screen.
 

seaweeduk

OpenDayZ Rockstar!
Very useful indeed thanks for sharing your work cyrq.

I'll try and improve your 3d editor placements when I get a chance, you aren't the only person who hates the editor at times though.
 
Top