Jump to content

Recommended Posts

There are a lot of boxes and items like this : ... which have no inventory.

35671048800_3d8800f0b0_b.jpg

Is there any way to add an inventory to this item?


 

 

Share this post


Link to post
Share on other sites

Hi Theo,

 

1 hour ago, Theo1143 said:

There are a lot of boxes and items like this : ... which have no inventory.
 

Is there any way to add an inventory to this item?

 

FYI: You can't link to Photobucket anymore - they changed their policy - unless you want to give them $400.00 a year... I got bit by this too...


Something like this should do the trick - goes in the items init field. Obviously you do need to find the classnames of the items you want to add... This adds (4) AK-74's each loaded with (3) magazines...

RemoveAllWeapons this;
RemoveAllMagazines this;
this AddWeapon "AK_74";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddWeapon "AK_74";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddWeapon "AK_74";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddWeapon "AK_74";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddWeapon "AK_74";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";
this AddMagazine "30Rnd_545x39_AK";

This may help as well...
 


Regards,
Scott


Sent from my iPad using Tapatalk

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
17 minutes ago, scottb613 said:

...

 

 

 

 

Thanks but that still doesn't give the item and inventory.

I want to know a way of adding the inventory action to the item itself and give it a cargo to store items in.

Share this post


Link to post
Share on other sites

Hi Theo,

 

Sorry - I am missing your point - I thought you wanted to know how to place items into an empty ammo box ???

 

If the ammo box contains items - I believe the "Inventory" action  should be available when you approach it...

 

Regards,

Scott

Share this post


Link to post
Share on other sites

No thanks i'm really looking into "adding an inventory

There must be way with an addaction which has a script that acts as the container which opens once a player hits the button.

Or I was kinda hoping for a easier fix, isn't there something like this add cargo ?!?

 

5 minutes ago, scottb613 said:

If the ammo box contains items - I believe the "Inventory" action  should be available when you approach it...

 

No this was the first thing I tried.

(word game, ammo box is no ammo box lol... it is just a static empty object)

Share this post


Link to post
Share on other sites

Hi Theo,

 

Oh - you're trying to place items into a box you come across - in game - - - while I was explaining the editor function - - - gotcha - but can't help you - sorry - I don't know... Best of luck...

 

Regards,
Scott

Share this post


Link to post
Share on other sites
1 minute ago, scottb613 said:

...

no worries thanks anyway

  • Like 1

Share this post


Link to post
Share on other sites

I think you just use an existing box and open it remotely  using an action placed in the fake box

 

so first place a real box and make it invisible and name it ammobox1

 

then place the object you want to add an inventory to and add this code to the init

 

this addaction ["Open _Inv",
{ammobox1 setpos position (_this select 1);
(_this select 1) action ["Gear", ammobox1]},[], 6, true, true, "", "(_this distance _target)<1"];

You could probably just spawn a weaponholder but I find it easier just to place a real box and use that.

  • Like 1

Share this post


Link to post
Share on other sites
On 19-7-2017 at 8:58 PM, f2k sel said:

I think you just use an existing box and open it remotely  using an action placed in the fake box

 

so first place a real box and make it invisible and name it ammobox1

 

then place the object you want to add an inventory to and add this code to the init

 


this addaction ["Open _Inv",
{ammobox1 setpos position (_this select 1);
(_this select 1) action ["Gear", ammobox1]},[], 6, true, true, "", "(_this distance _target)<1"];

You could probably just spawn a weaponholder but I find it easier just to place a real box and use that.

Hahaha actually this was one of the first things I tried, hiding a real box over the "ugh ugh" fake ammobox but the action would be removed with it to.

This works amazing, thanks a lot!

 

this stuff is amazing, 

change the "(_this distance _target)<1"]; to "(_this distance _target)<3"]; and it just works like a normal box. 

Share this post


Link to post
Share on other sites
On 19.7.2017 at 6:42 PM, Theo1143 said:

There are a lot of boxes and items like this : ... which have no inventory.

 

Here's one solution

private _supply = "Supply500" createVehicle [0,0,0];
_supply attachTo [MyTinyAmmoBox, [0,0,0.3]];

I hope this helps

  • Like 7

Share this post


Link to post
Share on other sites
On 22-7-2017 at 1:53 AM, Nikander said:

 

Here's one solution


private _supply = "Supply500" createVehicle [0,0,0];
_supply attachTo [MyTinyAmmoBox, [0,0,0.3]];

I hope this helps

 

Oh yea that stuff is amazing, I only don't like it that you need to run it off a script first.
and also when u come to close u don't even see the inventory button because you are actually standing inside it. (prob would work better on bigger items)

Whatever, everyone hes own preference. Cheers looks amazing! :don14:

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

×