mr_shadow 4 Posted November 19, 2013 Hey I have question, hope you you have a solution for this. I have object1 on map that is adding action1. Action1 is spawning object2 on map and adding action to object2. Question: How to add action2 for all players nearby to this object? Problem: only person who pressed on action1 can see action2 Hope you understand what I mean and are able to help, thanks. Share this post Link to post Share on other sites
wok 1 Posted November 19, 2013 You probably will want to use nearObjects command. Could you post some sample code? It will make it easier to help you. Share this post Link to post Share on other sites
mr_shadow 4 Posted November 19, 2013 (edited) My problem is not how to add "player distance object2 <= 3" Problem: only person who pressed on action1 can see action2 The action2 is adding locally ONLY to person who pressed on action1. drop.sqf _pos = getpos player; objname= "Land_Money_F"; _obj = objname createVehicle _pos; _obj addAction ["Pickup","Pickup\Pickup.sqf",[],1,true,true,"",""]; dialog.hpp class RscShortcutButton_1702: RscShortcutButton { idc = 1702; text = "Drop"; x = 30 * GUI_GRID_W + GUI_GRID_X; y = 11 * GUI_GRID_H + GUI_GRID_Y; w = 6 * GUI_GRID_W; h = 1.5 * GUI_GRID_H; colorBackground[] = {0, 0.49, 1, 1}; action = "execVM 'drop.sqf'"; }; Edited November 19, 2013 by mr_shadow Share this post Link to post Share on other sites
mr_shadow 4 Posted November 19, 2013 Anyone knows how to add pickup.sqf for all players on map? Share this post Link to post Share on other sites
wok 1 Posted November 19, 2013 I am not sure but I think you should use BIS_fnc_MP, here's some info about how to use it with addAction http://www.armaholic.com/forums.php?m=posts&q=23147 Share this post Link to post Share on other sites
mr_shadow 4 Posted November 19, 2013 (edited) Well, Ive tryed this: 0 = [[_obj, ["Pickup","Pickup\pickup.sqf",[],1,true,true,"",""]],"", true, true] spawn BIS_fnc_MP; But i still have a problem - now i cant even see the action. Any tip what I'm doing wrong? ---------- Post added at 16:38 ---------- Previous post was at 15:32 ---------- _obj addAction ["Pickup","Pickup\pickup.sqf",[],1,true,true,"",""] spawn BIS_fnc_MP; is showing action, but only for player who dropped. Edited November 19, 2013 by mr_shadow Share this post Link to post Share on other sites
mr_shadow 4 Posted November 19, 2013 so noone knows? Share this post Link to post Share on other sites
Larrow 2820 Posted November 19, 2013 //this function needs to be available to all clients MyTag_fncMP_pickupAction = { _obj = _this select 0; _obj addAction ["Pickup","Pickup\Pickup.sqf",[],1,true,true,"","_target distance _this < 3"]; }; //where ever you add the action use this line instead [ [_obj], "MyTag_fncMP_pickupAction", true, false] spawn BIS_fnc_MP; So MyTag_fncMP_pickupAction is called on all clients via BIS_fnc_MP, this function adds the action to the passed object (locally on the clients machine). Share this post Link to post Share on other sites
mr_shadow 4 Posted November 19, 2013 (edited) That works, thanks for help. Edited November 21, 2013 by mr_shadow Share this post Link to post Share on other sites