Jump to content

Recommended Posts

Need some help on Addaction for MP running on Dedi server -

It all works when testing on Local but not on Dedi never get the add action .

Thanks


_grp = createGroup CIVILIAN;
_leader = _grp createUnit ["C_Orestes", _townpos, [], 0, "FORM"];
_leader addAction["Please give me 2 Water barrels for our Village", "missions\waterckeck.sqf", "Land_WaterBarrel_F", 6, True, True, "", "(_target distance _this) < 3"];

..........

Share this post


Link to post
Share on other sites

addAction is a local command, it has to be executed on all clients. You can tell from the "EL" icon on top of the wiki page.

First you give the unit a global variable and broadcast it, then you can use BIS_fnc_MP & BIS_fnc_spawn to add the action remotely.

This should work:

_grp = createGroup CIVILIAN;
action_unit = _grp createUnit ["C_Orestes", getpos player, [], 0, "FORM"]; publicVariable "action_unit";

[{ action_unit addAction ["Please give me 2 Water barrels for our Village", "missions\waterckeck.sqf", "Land_WaterBarrel_F", 6, True, True, "", "(_target distance _this) < 3"]; }, "BIS_fnc_spawn", nil, true, true] call BIS_fnc_MP;

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

×