Arma 3
Lonfox May 1, 2018 @ 8:50pm
ACE ARSENAL option on ammobox
i know of the option to add bis_arsenal to box to have virtual arsenal. but i want to add the ace arsenal instead. ive looked on the ACE 3 wiki but i just dont understand and ive been trying to understand that page but its still not making any sense. i'm an amatuer scripter so any help would be much appreciated.
Originally posted by IM SORRY BUFFALO:
either put this in the box's init if your doing it that way
[this, player, true] call ace_arsenal_fnc_openBox

or if its from a script either put it in the initPlayerLocal(if multiplayer)/init(if singleplayer)
[boxName, player, true] call ace_arsenal_fnc_openBox

or execute it globally with remoteExec from the server. im assuming the part that confused you was this
[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox
MyItem1/2/N was just examples of class names of weapons/equipment that you could have appear when calling the arsenal, such as if you wanted to create a specific arsonal that only displayed stuff you wanted you would create an array with class names of the weapons and another array with equipment like this

_wepArry = ["classnames", "classname"];
_equipArry = ["classnames", "classname];
[_box, [_wepArry, _equipArry]] call ace_arsenal_fnc_initBox
this adds whats inside the 2 arrays into the arsenal(im assuming, i have never used ace before)
< >
Showing 1-11 of 11 comments
The author of this thread has indicated that this post answers the original topic.
IM SORRY BUFFALO May 1, 2018 @ 10:15pm 
either put this in the box's init if your doing it that way
[this, player, true] call ace_arsenal_fnc_openBox

or if its from a script either put it in the initPlayerLocal(if multiplayer)/init(if singleplayer)
[boxName, player, true] call ace_arsenal_fnc_openBox

or execute it globally with remoteExec from the server. im assuming the part that confused you was this
[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox
MyItem1/2/N was just examples of class names of weapons/equipment that you could have appear when calling the arsenal, such as if you wanted to create a specific arsonal that only displayed stuff you wanted you would create an array with class names of the weapons and another array with equipment like this

_wepArry = ["classnames", "classname"];
_equipArry = ["classnames", "classname];
[_box, [_wepArry, _equipArry]] call ace_arsenal_fnc_initBox
this adds whats inside the 2 arrays into the arsenal(im assuming, i have never used ace before)
Last edited by IM SORRY BUFFALO; May 1, 2018 @ 10:20pm
Lonfox May 1, 2018 @ 10:26pm 
Originally posted by IM SORRY BUFFALO:
either put this in the box's init if your doing it that way
[this, true] call ace_arsenal_fnc_initBox;

or if its from a script either put it in the initPlayerLocal(if multiplayer)/init(if singleplayer)
[boxName, true] call ace_arsenal_fnc_initBox;

or execute it globally with remoteExec from the server. im assuming the part that confused you was this
[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox
MyItem1/2/N was just examples of class names of weapons/equipment that you could have appear when calling the arsenal, such as if you wanted to create a specific arsonal that only displayed stuff you wanted you would create an array with class names of the weapons and another array with equipment like this

_wepArry = ["classnames", "classname"];
_equipArry = ["classnames", "classname];
[_box, [_wepArry, _equipArry]] call ace_arsenal_fnc_initBox

so if i were to go and put in script form would that go into the Description.ext or something else? im just working on a multimission campaign and the first mission had the vanilla arsenal and i had some complaints about that so ive been trying to learn how to get the ace arsenal to work as a scroll option on a box. i tried the first one where i put it into the init for the box and i dont get that scroll option. im sure i wasnt very descriptive orignally.
IM SORRY BUFFALO May 1, 2018 @ 10:59pm 
Originally posted by Lonfox:
Originally posted by IM SORRY BUFFALO:
either put this in the box's init if your doing it that way
[this, true] call ace_arsenal_fnc_initBox;

or if its from a script either put it in the initPlayerLocal(if multiplayer)/init(if singleplayer)
[boxName, true] call ace_arsenal_fnc_initBox;

or execute it globally with remoteExec from the server. im assuming the part that confused you was this
[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox
MyItem1/2/N was just examples of class names of weapons/equipment that you could have appear when calling the arsenal, such as if you wanted to create a specific arsonal that only displayed stuff you wanted you would create an array with class names of the weapons and another array with equipment like this

_wepArry = ["classnames", "classname"];
_equipArry = ["classnames", "classname];
[_box, [_wepArry, _equipArry]] call ace_arsenal_fnc_initBox

so if i were to go and put in script form would that go into the Description.ext or something else? im just working on a multimission campaign and the first mission had the vanilla arsenal and i had some complaints about that so ive been trying to learn how to get the ace arsenal to work as a scroll option on a box. i tried the first one where i put it into the init for the box and i dont get that scroll option. im sure i wasnt very descriptive orignally.
im assuming your very new, if thats the case dont touch the description.ext unless you know for sure what your doing as it will make finding what went wrong very difficult if you dont have a clue where to look. if you want the scroll option then you need to use what is called a addAction which is pretty much this
object addAction ["Name of scroll option",{code here}];
so inside the box put

this addAction["Open Arsenal", {[this, player, true] call ace_arsenal_fnc_openBox}];
Lonfox May 3, 2018 @ 2:37pm 
this worked thank you very much you sir are a hero!!
IM SORRY BUFFALO May 3, 2018 @ 2:40pm 
Originally posted by Lonfox:
this worked thank you very much you sir are a hero!!
sweet
Kai May 15, 2020 @ 6:06am 
I have tried this and I get an error saying undefined this ? Very new to this and looking to open the ammo box from scroll wheel. scroll option works great it the error on opening
Kai May 16, 2020 @ 5:09am 
thank you I'm very new as you can guess. When I was trying to do this as a scroll wheel function do you know why it was going wrong for me ? Trying to learn so prob best to ask questions and understand what I did wrong to get it right next time

Almand May 30, 2020 @ 4:16pm 
Originally posted by Altheus:
thank you I'm very new as you can guess. When I was trying to do this as a scroll wheel function do you know why it was going wrong for me ? Trying to learn so prob best to ask questions and understand what I did wrong to get it right next time

I've had this same problem for freaking ever and I just found a work around. Give the arsenal a name in the "Variable Name" box and then use that name instead of "this"

Example:
I named my box "are1"

this addAction["Open Arsenal", {[are1, player, true] call ace_arsenal_fnc_openBox}];


Last edited by Almand; May 30, 2020 @ 4:16pm
Bandit Jul 19, 2020 @ 5:39pm 
So every time my vehicle blows up and respawns the arsenal is gone. Ive tried placing "this addAction["Open Arsenal", {[vehicle variable name, player, true] call ace_arsenal_fnc_openBox}];" into the expression box for the vehicle respawn module but im not sure what the hail im doing lol. Anyone know?
Bandit Jul 20, 2020 @ 6:34pm 
Originally posted by Spidy:
Dont destroy your vehicles..... :steamfacepalm:
ok..... let me just go tell the 20 guys (ex/retired/active duty) that play milsim on my server that all we have to do is not get blown up by jihadis
Smittyman Oct 23, 2022 @ 4:57am 
Since the line only fires once upon creation, it won't run again when the vehicle is destroyed. Your best bet is to look for a way to check if the vehicle is destroyed, write to a variable and have the server check for that variable and re-run the command on the respawned vic. Simpler solution really is to just not lose the vic or to move the arsenal to a box or something else that's out of harm's way.
< >
Showing 1-11 of 11 comments
Per page: 1530 50