Jump to content

[FIX]Toolbox "Remove Camo Net" and "Remove Tank Trap"


Recommended Posts

I am the type of person who hates using the self action scroll buttons to do things so I decided to look into the remove options problem that the toolbox has. This will fix the problem with not being able to remove tank traps and some camo nets via the right click menu for the toolbox.

 

Upon writing this tutorial/fix I assume everyone knows how to call a custom sqf file and I assume everyone already has a custom compiles.sqf. I also will NOT be held reliable if you break your server. I did this on my test server and my live server and have no problems. Lets begin.

 

First thing we need to do is get your object_removeTankTrap.sqf and object_removeNet.sqf. Both of these files can be found in the compile folder within dayz_code.pbo. Place these two files in your custom/fixes folder within your mission.pbo. or mission folder.

 

Now open your object_removeTankTrap.sqf and find this code

_nearTankTraps = nearestObjects [player, ["Hedgehog_DZ"], 1];

and change it to 

_nearTankTraps = nearestObjects [player, ["Hedgehog_DZ"], 3];

This increases the range a little bit to help the action actually work a little easier. I wouldn't change it to anything higher than 3. Save and close our sqf. 

Now open your object_removeNet.sqf and find this code

_nearNets = nearestObjects [player, ["DesertLargeCamoNet","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ"], 5];

and change it to

_nearNets = nearestObjects [player, ["DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ"], 10];

What this does is increase the distance a little bit making the action happen a little easier and replaces the error in the code that had the large desert net referenced twice. Now all 4 of the nets can be removed with the toolbox. Don't change to anything higher than 10. Save and close your sqf. 

Now open our custom compiles.sqf. Now find these lines. 

player_removeNet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeNet.sqf";
player_removeTankTrap = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeTankTrap.sqf";

Comment them out and call your custom file location like so

//player_removeNet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeNet.sqf";
//player_removeTankTrap = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeTankTrap.sqf";

player_removeNet = compile preprocessFileLineNumbers "custom\object_removeNet.sqf";
player_removeTankTrap = compile preprocessFileLineNumbers "custom\object_removeTankTrap.sqf";

Save your compiles and you're done. I don't think I did that bad for my very first tutorial lol. Have a good night and I hope I helped. I'm sure there are other people out there that noticed that the right clicking for the toolbox didn't work right. :)

Link to comment
Share on other sites

  • 3 months later...

im not sure if 1.0.5.1  has changed anything but i cannot see 

 

object_removeTankTrap.sqf and object_removeNet.sqf. Both of these files can be found in the compile folder.

 

is there another file i need to edit now.

 

Thank you fro your time.

Link to comment
Share on other sites

  • 3 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...