Sanchez Milsim 70 Posted February 17, 2018 Hi, i would like to addaction to object with remoteexec but i dont know how or where to place conditions of distance. I usually use addaction as this: this addAction ["Pick up INTEL","scripts\add_intel.sqf",[],1,false,true,"","_this distance _target < 2"]; And i would like to merge this with remoteexec addaction [this,["Pick up INTEL", {"scripts\add_intel.sqf"}]] remoteExec ["addAction",2]; Thanks for help!! Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 17, 2018 3 hours ago, Sanchez_ESUS said: Hi, i would like to addaction to object with remoteexec but i dont know how or where to place conditions of distance. I usually use addaction as this: this addAction ["Pick up INTEL","scripts\add_intel.sqf",[],1,false,true,"","_this distance _target < 2"]; And i would like to merge this with remoteexec addaction [this,["Pick up INTEL", {"scripts\add_intel.sqf"}]] remoteExec ["addAction",2]; Thanks for help!! Well you left out the part that contains the distance condition, or was that on purpose? this addAction ["Pick up INTEL","scripts\add_intel.sqf",[],1,false,true,"","_this distance _target < 2"]; //remoteExec: [this,["Pick up INTEL","scripts\add_intel.sqf",[],1,false,true,"","_this distance _target < 2"]] remoteExec ["addAction",2]; The 2 in the last part of remoteExec means the addAction will only be added on the server, local clients will never see it. Was that also on purpose? If you want any player to see the action use 0 instead. Cheers Share this post Link to post Share on other sites
Sanchez Milsim 70 Posted February 17, 2018 Hi Grumpy Old Man i would like to add this addaction to a object drop killed units and be compatible with dedicated server. But all examples i find dont use any condition and you can take item from unlimited distance. I would like to use distance condition. Its second part okk, that is syntax?? Share this post Link to post Share on other sites
Sanchez Milsim 70 Posted February 17, 2018 4 minutes ago, Sanchez_ESUS said: Hi Grumpy Old Man i would like to add this addaction to a object drop killed units and be compatible with dedicated server. But all examples i find dont use any condition and you can take item from unlimited distance. I would like to use distance condition. Its second part okk, that is syntax?? Ok i check this and its ok, changing last 2 for 0 to exec it globally, many thanks! 1 Share this post Link to post Share on other sites