Jump to content
Black_Ice931

Remove Inventory from obj

Recommended Posts

Hello everyone,

 

How can I remove the inventory from an object? Or at lest remove the menu' voice that allows me to open it?

I did see a very small amount of solutions online, but nothing worked.
I did try to turn the object into a simple object, but I need it to be dragable - so this solution is out.

It has to work with ACE3 mod.

Cheers!

Share this post


Link to post
Share on other sites

Easy to do via config files. But if you don't want to go the addons way and just do it for a specific object in your mission  you can use eventhandlers.

this addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; closedialog 0}];

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
5 hours ago, Mr H. said:

Easy to do via config files. But if you don't want to go the addons way and just do it for a specific object in your mission  you can use eventhandlers.

this addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; closedialog 0}];

Just tried the second option, it doesn't work 😞

Share this post


Link to post
Share on other sites

What object are you trying ti disable?

Share this post


Link to post
Share on other sites
15 minutes ago, Black_Ice931 said:

Is the large black box from Contact(platform), should be in the storage category

Class "I_E_CargoNet_01_ammo_F" ?

What's your goal?
I understand you want to empty the crate contents, and disable the option to open the crate.

 

But do you want the crate to loadable with ACE?

Is the crate a prop piece or do you want to do something with it?

 

 

Edit:
I should read more carefully.

"I did try to turn the object into a simple object, but I need it to be dragable - so this solution is out."

 

Edited by Maff

Share this post


Link to post
Share on other sites
50 minutes ago, Black_Ice931 said:

Just tried the second option, it doesn't work 😞

It won't remove the action (for that you MUST make an addon) but it should close the inventory as soon as you open it.

Share this post


Link to post
Share on other sites
24 minutes ago, Mr H. said:

It won't remove the action (for that you MUST make an addon) but it should close the inventory as soon as you open it.

This doesn't close the inventory for me either.

 

 

This works for me:

//	Close the inventory menu with slight delay - Not enough time to take anything from crate though.

_box addEventHandler ["ContainerOpened", {
	params ["_container", "_unit"];
	
	_unit action ["Gear", objNull];
	
}];

 

Another method may be to empty (or customise) the crate and disable simulation for the crate:

//	Can remove all contents, or add your own contents.
clearBackpackCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
clearItemCargoGlobal _box;

//	Doesn't allow removing contents from crate.
_box enableSimulationGlobal false;

 

Both methods still allow players to load crate into vehicles... Good luck carrying/dragging this bad boy though!
From what I can remember, there are methods of making crates "lighter to carry" with ACE.

 

 

 

Edited by Maff
Spelling / Cleanup.
  • Thanks 1

Share this post


Link to post
Share on other sites
7 hours ago, Mr H. said:

this addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; closedialog 0}];

 

40 minutes ago, Maff said:

This doesn't close the inventory for me either.

 

Just a timing issue, closing dialog before its initialised.

this addEventHandler [ "ContainerOpened", {
	h = [] spawn {
		waitUntil{ !isNull findDisplay 602 };
		closeDialog 1;
	};
}];

 

  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites
On 8/24/2019 at 9:42 PM, Maff said:

//	Close the inventory menu with slight delay - Not enough time to take anything from crate though.

_box addEventHandler ["ContainerOpened", {
	params ["_container", "_unit"];
	
	_unit action ["Gear", objNull];
	
}];

 

sorry for the delay.

Just tried this and it works.

 

Thank you guys both!

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

×