Raptoid21 1 Posted January 12, 2019 Hello, I'm attempting to get a whitelist working for an Ace Arsenal box, but I'm unsure how to use it. I don't know much about the editor but so far I got the Arsenal to work, however it's showing everything instead of limiting what I have whitelisted, I'm assuming I have to add something else to get it to work. I tried this command: this addAction["Open Arsenal", {[this, player, true] call ace_arsenal_fnc_openBox}]; However "this" didn't work so I changed the variable to "box" and changed the init line to this addAction["Open Arsenal", {[box, player, true] call ace_arsenal_fnc_openBox}]; Thank you. Share this post Link to post Share on other sites
Mr H. 402 Posted January 13, 2019 Imagine what's between {} is a complete different script (well it is) it doesn't know what "this is" but with addaction you can pass parameters to the script so: this addAction["Open Arsenal", {[_this select 0, player, true] call ace_arsenal_fnc_openBox},[this]]; will work. to white list items just follow the loadout steps here :https://ace3mod.com/wiki/framework/arsenal-framework.html#13-arsenal-only-with-items-from-default-loadouts-see-section-4 1 Share this post Link to post Share on other sites
Raptoid21 1 Posted January 13, 2019 14 hours ago, Mr H. said: Imagine what's between {} is a complete different script (well it is) it doesn't know what "this is" but with addaction you can pass parameters to the script so: this addAction["Open Arsenal", {[_this select 0, player, true] call ace_arsenal_fnc_openBox},[this]]; will work. to white list items just follow the loadout steps here :https://ace3mod.com/wiki/framework/arsenal-framework.html#13-arsenal-only-with-items-from-default-loadouts-see-section-4 Thank you, I'm trying some stuff to get the whitelist working though. this addAction["Open Arsenal", {[_this select 0, player, true] call ace_arsenal_fnc_initBox},[this]]; [_box, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox; [_box, true] call ace_arsenal_fnc_initBox; I tried inserting these three lines into the init field to get the Ace surgical kit to show up alone for example from that link, but it says it expects a bool,array. Should have mentioned I know nothing about even basic coding Share this post Link to post Share on other sites
Mr H. 402 Posted January 14, 2019 [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_addVirtualItems if you add to an existing box. [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox; if you create a new box BTW I think you don't need the addaction because ace does it itself Share this post Link to post Share on other sites
Raptoid21 1 Posted January 14, 2019 13 hours ago, Mr H. said: [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_addVirtualItems if you add to an existing box. [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox; if you create a new box BTW I think you don't need the addaction because ace does it itself Unfortunately neither of those worked. I'm assuming that line placed in the init is just supposed to work? I'm just troubleshooting in the editor, so do I have to do something else? This might be a stupid question but I'm confused as to what constitutes a "new" box, aren't all boxes technically new when the mission starts? Or aren't they all already existing since they've been placed in the editor? The menu item wouldn't even show up so I tried this addAction["Open Arsenal", [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox]; this2 addAction["Open Arsenal", [this2, ["ACE_surgicalKit"]] call ace_arsenal_fnc_addVirtualItems]; And they do show up in the scroll menu, however they don't do anything. Share this post Link to post Share on other sites
Mr H. 402 Posted January 14, 2019 Yes that's because you don't need the add action (ace does it already and adds an ace 3 interaction I think). BTW "This" is not just any variable. It refers to the object whose init box you're editing. Things like this2 make no sense at all 1 Share this post Link to post Share on other sites
Dedmen 2721 Posted January 15, 2019 16 hours ago, Raptoid21 said: And they do show up in the scroll menu, however they don't do anything. Yes. Because you tell them to not do anything. On 13.1.2019 at 9:19 AM, Mr H. said: Imagine what's between {} is a complete different script (well it is) You need to pass a script to the addAction's "script" parameter. What you are doing is executing [this, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox And passing that result to addAction. the initBox function returns nothing, so you are passing nothing to the addAction. Thus the addAction also does.. Nothing. As said multiple times, ACE Arsenal add's it's own action to the box in the ACE Interaction menu, just use that. On 14.1.2019 at 12:04 AM, Raptoid21 said: but it says it expects a bool,array. Correct. On 14.1.2019 at 12:04 AM, Raptoid21 said: [_this select 0, player, true] call ace_arsenal_fnc_initBox You are trying to pass a object (player) as the whitelist, that doesn't make sense. It can only be bool or array. On 14.1.2019 at 12:04 AM, Raptoid21 said: [_box, ["ACE_surgicalKit"]] call ace_arsenal_fnc_initBox; [_box, true] call ace_arsenal_fnc_initBox; You are setting up the whitelist correctly. But then right after that you are deleting the whitelist again and are allowing all items. 16 hours ago, Raptoid21 said: The menu item wouldn't even show Yeah because it's not in the scroll menu, it's in the ACE menu. 2 Share this post Link to post Share on other sites