[Tutorial] - How To Enable Building On Roads in DayZEpoch

I disabled this because there were are few times when I found the perfect little house to use as a base camp but it had a small dirt path leading up to it. I wanted to put my gate there but it said "Cannot build on roads". Some people suggested to raise it above the ground but that didn't work either. So I found out how to turn it off.

Step 1
If you're not currently using this file for another script then you'll need to copy the player_build.sqf from the dayz_code.pbo in your mission folder.

Down around line 376 you should see:
if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };

Simply comment it out like this:
//if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };

Alternatively you could also change '_cancel = true' to '_cancel = false' and it should still disable it.

Save this to your custom or scripts folder (whatever you called the folder that you keep your custom scripts in).

Step 2
Open the compiles.sqf in that same folder and add this line to it:
player_build = compile preprocessFileLineNumbers "(name of your custom scripts folder here)\player_build.sqf";

Save it, repack your mission.pbo and load it up to your server. That should do it! I hope I explained that properly. Let me know if anyone uses this but cannot get it to work.

All credit given to the original code writers of Arma2/DayZ/Epoch. All I did was comment out a line.
 
Last edited:
I disabled this because there were are few times when I found the perfect little house to use as a base camp but it had a small dirt path leading up to it. I wanted to put my gate there but it said "Cannot build on roads". Some people suggested to raise it above the ground but that didn't work either. So I found out how to turn it off.

Step 1
If you're not currently using this file for another script then you'll need to copy the player_build.sqf from the dayz_code.pbo in your mission folder.

Down around line 376 you should see:


Simply comment it out like this:


Alternatively you could also change '_cancel = true' to '_cancel = false' and it should still disable it.

Save this to your custom or scripts folder (whatever you called the folder that you keep your custom scripts in).

Step 2
Open the compiles.sqf in that same folder and add this line to it:


Save it, repack your mission.pbo and load it up to your server. That should do it! I hope I explained that properly. Let me know if anyone uses this but cannot get it to work.

All credit given to the original code writers of Arma2/DayZ/Epoch. All I did was comment out a line.
This does not work. any common reasons as to why?

- changed compile path to call from "scripts/compile" in the init.sqf file.
- followed above instructions. (used comment out option)
- running DayZEpoch 1.0.4.2
 
you guys really shoold take a look on epoch forums for epoch related things...
there is a much easier and quicker way to do this within the init.sqf

Code:
DZE_BuildOnRoads = true; // Default: False
simple as that...
 
you guys really shoold take a look on epoch forums for epoch related things...
there is a much easier and quicker way to do this within the init.sqf

Code:
DZE_BuildOnRoads = true; // Default: False
simple as that...
Thanks man!
 
Back
Top