Jubal Savid 10 Posted May 24, 2021 im not sure what's gone wrong here is what i have s1 is the name of a ai i want s1 to be capturable by a hold action the sqf file reads [s1, "Capture" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { [s1] join p}, {}, [], 12, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0,s1]; help plox Share this post Link to post Share on other sites
RCA3 593 Posted May 25, 2021 Looks good to me as long as s1 and p are defined (on the editor or otherwise). p should be player I assume. Share this post Link to post Share on other sites
Jubal Savid 10 Posted May 25, 2021 https://steamcommunity.com/sharedfiles/filedetails/?id=2497185496 heres da error Share this post Link to post Share on other sites
RCA3 593 Posted May 25, 2021 Is it possible you have [s1,[s1 ? Share this post Link to post Share on other sites
Jubal Savid 10 Posted May 25, 2021 i did, but i removed the extra and it still dont work Share this post Link to post Share on other sites
Jubal Savid 10 Posted May 25, 2021 [s1, "Capture" "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { [s1] join p}, {}, [], 12, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0,s1]; current the missing warning pops up when i first load the mission Share this post Link to post Share on other sites
RCA3 593 Posted May 25, 2021 Blind me 😐, you're missing a comma (,) after "Capture"! Share this post Link to post Share on other sites
Jubal Savid 10 Posted May 25, 2021 Still dont work, im also trying to do this with a sqf file and a trigger my sqf files are in "missions>UN.tanoa" i have the trigger set up for condition p distance s1 < 5 this = [] execVM "slave.sqf"; Share this post Link to post Share on other sites
RCA3 593 Posted May 25, 2021 Don't use engine variables as handles or otherwise. this is reserved by Arma for specific purposes, so you need to use something else there e.g. null, 0, yourvariable, etc. BIS_fnc_holdActionAdd is already checking for distance before activation "_this distance _target < 3", so discard the trigger and just write on s1's init field: if (isServer) then{null = [] execVM "slave.sqf"}; Share this post Link to post Share on other sites
pierremgi 4886 Posted May 25, 2021 Why are you remote executing this code? Are you in MP , and again, why such code ? PS: your holdActionAdd works fine between p as player and s1 as... what unit/asset you want , if you can close its center position up to 3 meters. For big vehicles, that is not enough (5 or 7m). The code around this function is...weird. SP/MP, if you don't have any other interaction, so just between p and s1 in init field of s1 (or p, or any object 😊) [s1, "Capture", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { [s1] join p}, {}, [], 12, 0, true, false ] call BIS_fnc_holdActionAdd; That's all folks! If you need more behavior, like interaction with any enemy, think about cursorObject and more condition on it. 1 Share this post Link to post Share on other sites
pierremgi 4886 Posted May 25, 2021 24 minutes ago, RCA3 said: Don't use engine variables as handles or otherwise. this is reserved by Arma for specific purposes, so you need to use something else there e.g. null, 0, yourvariable, etc. Yep! 24 minutes ago, RCA3 said: BIS_fnc_holdActionAdd is already checking for distance before activation "_this distance _target < 3", so discard the trigger Yep! 24 minutes ago, RCA3 said: if (isServer) then{null = [] execVM "slave.sqf"}; No! It's weird to filter this function for server execution, then remote execute everywhere! just forget the remote execution (and this condition about server) In SP, the remote execution is totally useless! In MP, each time you remoteExec something for nuts, you are increasing the network flow for nuts. 1 Share this post Link to post Share on other sites
RCA3 593 Posted May 25, 2021 1 hour ago, pierremgi said: No! It's weird to filter this function for server execution, then remote execute everywhere! just forget the remote execution (and this condition about server) I don't know what else he has inside slave.sqf so I kept it has per his design choice. And his choice of remoteexec. edit: do as @pierremgi suggested. Share this post Link to post Share on other sites
Jubal Savid 10 Posted May 25, 2021 2 hours ago, pierremgi said: [s1, "Capture", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { [s1] join p}, {}, [], 12, 0, true, false ] call BIS_fnc_holdActionAdd; That's all folks! If you need more behavior, like interaction with any enemy, think about cursorObject and more condition on it. will this work in multi player Share this post Link to post Share on other sites
pierremgi 4886 Posted May 25, 2021 1 hour ago, Jubal Savid said: will this work in multi player Yes.... without any interest if you are not P 🤪 Share this post Link to post Share on other sites