Jump to content

[Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing


mudzereli

Recommended Posts

 

 

 

i think the problem here is not that hard to solve, never messed around with deploy anything that much though, BUT:

 

Array

String

 

_inventory = (weapons _player) + (magazines _player) + (typeOf (unitBackpack _player));

 

so if i read that right this lines needs to be:

_inventory = (weapons _player) + (magazines _player) + [(typeOf (unitBackpack _player))];

 

 

Ok, so I found that code in wrapper.sqf. I will edit it and see what happens.

Link to comment
Share on other sites

player_deploy.sqf

 

from

_missing = "";
_hasrequireditem = true;
{
    _hastoolweapon = _x in weapons player;
    if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); };
} count _require; 

to

_missing = "";
_hasrequireditem = true;
{
    _hastoolweapon = _x in weapons player;
	_hasBackpack = _x == typeOf (unitBackpack player);
    if(!_hastoolweapon && !_hasBackpack) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); };
} count _require;

not tested though, but you get the idea :)

Link to comment
Share on other sites

well right ^^

little bit tired here -.-

 

forget the last part:

 

try change this line:

_hastoolweapon = (_index call getDeployableKitClass) in ((weapons player) + (magazines player));

to

_hastoolweapon = (_index call getDeployableKitClass) in ((weapons player) + (magazines player) + [typeOf (unitBackpack player)]);

to this

Link to comment
Share on other sites

Thanks for all the help, Schwede. That final bit of code worked. The only problem now is that the gunbag isn't removed from the player when he deploys the gun and if you allow repacking, you get another gunbag on the ground, along with a tripod bag so now you have two gunbags and a tripod bag. Of course the solution to the last part is simply not to allow repacking, but it would be awesome if there's a way to remove the backpack from the player when the gun gets deployed.

Link to comment
Share on other sites

Thanks for all the help, Schwede. That final bit of code worked. The only problem now is that the gunbag isn't removed from the player when he deploys the gun and if you allow repacking, you get another gunbag on the ground, along with a tripod bag so now you have two gunbags and a tripod bag. Of course the solution to the last part is simply not to allow repacking, but it would be awesome if there's a way to remove the backpack from the player when the gun gets deployed.

 

Look for this in wrapper.sqf

_player removeMagazine _part;

Add this under

_player removeBackpack _part;
Link to comment
Share on other sites

 

Look for this in wrapper.sqf

_player removeMagazine _part;

Add this under

_player removeBackpack _part;

 

Adding that removes the Deploy Anything items. I can't right click on the gun pack and if I click on my toolbox, I only have the standard Epoch options, none of the stuff in the Deploy Anything config.

Link to comment
Share on other sites

this needs a bit more coding:

 

removeBackpack unit

 

but this will remove everytime the backpack of the player. Will write something in a couple of minutes

 

EDIT: 

 

try adding this instead:

		if (isClass(configFile >> "CfgVehicles" >> (typeOf _part))) then {
			removeBackpack _player;
		};

if this does not work try it just with:

		if (isClass(configFile >> "CfgVehicles" >> _part)) then {
			removeBackpack _player;
		};
Link to comment
Share on other sites

 

this needs a bit more coding:

 

removeBackpack unit

 

but this will remove everytime the backpack of the player. Will write something in a couple of minutes

 

EDIT: 

 

try adding this instead:

		if (isClass(configFile >> "CfgVehicles" >> (typeOf _part))) then {
			removeBackpack _player;
		};

if this does not work try it just with:

		if (isClass(configFile >> "CfgVehicles" >> _part)) then {
			removeBackpack _player;
		};

 

The second one worked! Thanks. The only issue now is that setting damage limit to -1 doesn't prevent it from being repacked and when you repack it, a tripod bag appears with the gun bag.

Link to comment
Share on other sites

Ok, so now there's a new problem. With this solved, the backpack is taken away, which is great, but when I enter the gun, my screen goes black. If I exit to the lobby and come back in, I can see again and I can enter the gun and use it just fine. If I disassemble it and redeploy it, the same black screen happens again.

Link to comment
Share on other sites

Ok, so now there's a new problem. With this solved, the backpack is taken away, which is great, but when I enter the gun, my screen goes black. If I exit to the lobby and come back in, I can see again and I can enter the gun and use it just fine. If I disassemble it and redeploy it, the same black screen happens again.

 

You may need to add it to dayz_allowedObjects 

Link to comment
Share on other sites

That did it! Now, how to stop the gun from being disassembled.... 

 

I enabled packing for the gun, but the pack option doesnt show up

 

This is the code :

["M2StaticMG_US_Bag_EP1",[0,2,0],1,0.9,true,false,false,true,true,true,false,["M2StaticMG_US_EP1"],[],["M2StaticMG_US_Bag_EP1"],"true"]
Link to comment
Share on other sites

I've tried setting damage to 0, 0.9, 1 and -1 and I still get the option to disassemble. 

 

On another note, I have set up a recipe for an M240 nest, but I'm getting that same black screen as I did at first with the M2. I added "Fort_Nest_M240" to DZE_safeVehicle and dayz_allowedObjects. Any idea if it needs to be added someplace else? As with the M2, I get the black screen and have to go to the lobby and come back before I can see again. 

 

*edit* It seems that the black screen is intermittent. I just deployed an M2 and I got the black screen again. I'm getting it with a DSHKM mounted gun too....

 

*edit 2* I apparently had the guns set to false for _simulation. Changed that to true and all seems ok now.

Link to comment
Share on other sites

I've tried setting damage to 0, 0.9, 1 and -1 and I still get the option to disassemble. 

 

The disassemble option is not from the script. its an arma feature on certain static guns. Cant get rid of it :(

Link to comment
Share on other sites

The disassemble option is not from the script. its an arma feature on certain static guns. Cant get rid of it :(

If you find the function Name you can use "terminate" to kill that function but don't ask me where to look ^^ probably maybe just do a commandingMenu instead of addaction. At least that will disallow the disassembling option to pop up.

Link to comment
Share on other sites

If you find the function Name you can use "terminate" to kill that function but don't ask me where to look ^^ probably maybe just do a commandingMenu instead of addaction. At least that will disallow the disassembling option to pop up.

 

There is an event handler called WeaponDisassembled

Link to comment
Share on other sites

I cannot seem to get this to work along side any towing and lifting script i have tried and would love to have a little help on this :(

ive tried running logistic tow and lift and also am now running r3y tow and lift after removing logistic tow and lift.

This script works fine until you add towing and lifting and then it breaks with no errors in rpt.

I installed this script to the T along with the overwrites part of it

Link to comment
Share on other sites

  • 2 weeks later...

Anyway to use this with DZGM? I cant get it working right. Ever since I downloaded this it overwrites the right click menu for the DZGM so it makes it unusable. 

 

in overwrites/clickactions : 

["Group Management","Group Management","execVM 'dzgm\loadGroupManagement.sqf';","true"],

Don't forget to take the ItemRadio class out of your extra_rc.hpp.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...