ANDstriker 0 Posted July 26, 2018 I'm making my first proper mission in the editor and I'm trying to change the text and color of the default action for the virtual arsenal. I created a small ammo box and added this in the init field: 0 = ["AmmoboxInit",[this,true]] spawn BIS_fnc_arsenal; The default action that comes with this is plain text that says "Arsenal". I want to change this to a different color and have it say "Open Arsenal". Share this post Link to post Share on other sites
RoryRothon 8 Posted July 26, 2018 *Untested... 0 = [ "<t color='#FF0000'>AmmoboxInit</t>", [ this, true ] ] spawn BIS_fnc_arsenal; 1 Share this post Link to post Share on other sites
POLPOX 779 Posted July 26, 2018 box removeAction (box getvariable "bis_fnc_arsenal_action") ; box addaction [ "<t color='#FF8800'>Open Arsenal</t>", { _box = _this select 0; _unit = _this select 1; ["Open",[nil,_box,_unit]] call bis_fnc_arsenal; }, [], 6, true, false, "", " _cargo = _target getvariable ['bis_addVirtualWeaponCargo_cargo',[[],[],[],[]]]; if ({count _x > 0} count _cargo == 0) then { _target removeaction (_target getvariable ['bis_fnc_arsenal_action',-1]); _target setvariable ['bis_fnc_arsenal_action',nil]; }; _condition = _target getvariable ['bis_fnc_arsenal_condition',{true}]; alive _target && {_target distance _this < 5 && {vehicle _this == _this}} && {call _condition} " ]; Run this after the mission launches. Most part of the code is copied from fn_arsenal.sqf. Share this post Link to post Share on other sites
ANDstriker 0 Posted July 26, 2018 @POLPOX This works but the original "Arsenal" action still stays there. Share this post Link to post Share on other sites
POLPOX 779 Posted July 26, 2018 this spawn { _this removeAction (_this getvariable "bis_fnc_arsenal_action") ; _this addaction [ "<t color='#FF8800'>Open Arsenal</t>", { _box = _this select 0; _unit = _this select 1; ["Open",[nil,_box,_unit]] call bis_fnc_arsenal; }, [], 6, true, false, "", " _cargo = _target getvariable ['bis_addVirtualWeaponCargo_cargo',[[],[],[],[]]]; if ({count _x > 0} count _cargo == 0) then { _target removeaction (_target getvariable ['bis_fnc_arsenal_action',-1]); _target setvariable ['bis_fnc_arsenal_action',nil]; }; _condition = _target getvariable ['bis_fnc_arsenal_condition',{true}]; alive _target && {_target distance _this < 5 && {vehicle _this == _this}} && {call _condition} " ]; } Then do like this. Share this post Link to post Share on other sites
Larrow 2823 Posted July 26, 2018 0 = this spawn { ["AmmoboxInit",[_this,true]] call BIS_fnc_arsenal; if ( hasInterface ) then { waitUntil{ !isNil { _this getVariable "bis_fnc_arsenal_action" } }; _this setUserActionText [ _this getVariable "bis_fnc_arsenal_action", "<t color='#FF8800'>Open Arsenal</t>" ] }; }; Just rename the action via setUserActionText. 4 Share this post Link to post Share on other sites