Jump to content
Sign in to follow this  
TAW_Yonose

Any item to work as a ammobox

Recommended Posts

So im making a mission where i have a battalion starts as parajumping, i also want it to look like the ammoboxes is also coming from the parajump this item is the one i use (this isent a ammobox) Land_PaperBox_open_full_F,

- Is it possible to get this item to work as an ammobox?

- Is it possible to add a parachute to it, like the parachute is actually on the item?

Thank you.

Share this post


Link to post
Share on other sites

Thanks for the answers Na_Palm and Fusion13,

Na_Palm

thanks for the tip but i dident get it working probably because of my lack of skills in codes/scripts.

I tried with

(player action ["Gear", _ammobox]

and

(player action ["Gear", _ammobox];

but with no luck.

Fusion13

thanks for the reply, the item im using is a open box with loads of ammoboxes inside, this isent a realy ammobox so i need to make the functions to a ammobox to the item.

Share this post


Link to post
Share on other sites

_emptyBox = "Land_PaperBox_open_empty_F" createVehicle [0,0,0];
_weaponCrate = "Box_NATO_Wps_F" createVehicle [0,0,0];
_weaponCrate attachTo[_emptyBox,[-0.2,0.3,0.38]];

Then put the _emptyBox at the position you need it at or w/e

Or place an emptybox down and put in the init:

_weaponCrate = "Box_NATO_Wps_F" createVehicle [0,0,0];
_weaponCrate attachTo[this,[-0.2,0.3,0.38]];

Example Picture:

http://tonic.pw/arma3%202014-02-07%2013-59-16-61.png

Share this post


Link to post
Share on other sites

have you tried:

Addaction in Box initialisation in editor

 this addaction ["Inventory","BoxContent.sqf"];

BoxContent.sqf

private["_target"];
_target= _this select 0;
0=[_target] spawn {
   disableSerialization;
   CreateGearDialog [_this select 0,"RscDisplayInventory"];
};

Two things: I found it needs to spawn, and it needs to have the disableserialization or it crashes the game.

At this stage this only shows the players gear dialog, but i thought it was a good start.

Then its a matter of having items on the left side you can pick up. I have not managed this yet.

I have tried spawning in an ammo crate and getting the contents of this to show up but it hasn't worked.

Edited by KevsnoTrev
Or use Tonics method

Share this post


Link to post
Share on other sites

Another way which I helped Yonose with in Teamspeak, place this in the initialization field of the box:

if(isNil "fn_boxInventory") then {
fn_boxInventory =
{
	waitUntil {!isNil "boxWeaponHolder"};
	_this addAction["Inventory",{player action["Gear",boxWeaponHolder];},"",0,false,false,"",' _this distance _target < 3.5 '];
};

if(isServer) then {
	boxWeaponHolder = "Box_NATO_Wps_F" createVehicle [0,0,0];
	boxWeaponHolder allowDamage false;
	clearWeaponCargoGlobal boxWeaponHolder;
	clearMagazineCargoGlobal boxWeaponHolder;
	clearItemCargoGlobal boxWeaponHolder;
	publicVariable "boxWeaponHolder";
	[this,"fn_boxInventory",nil,true] spawn BIS_fnc_MP;
};
};

Doing stuff from the editors init field for stuff isn't my preferred way or recommended way but yeah.

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×