Will_The_Gamer_PT 25 Posted November 15, 2016 Does anyone know how to make this hold action activate a trigger at the end. I used this code. Its a modified version of what i found in this topic #define TARGET _this #define TITLE "Search for intel" #define ICON "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa" #define PROG_ICON "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa" #define COND_ACTION "true" #define COND_PROGRESS "true" #define CODE_START {hint "Searching for intel..."} #define CODE_TICK {} #define CODE_END {hint "Intel found!"} #define CODE_INTERUPT {} #define ARGUMENTS [] #define DURATION 60 #define PRIORITY 1 #define REMOVE true #define SHOW_UNCON false [TARGET,TITLE,ICON,PROG_ICON,COND_ACTION,COND_PROGRESS,CODE_START,CODE_TICK,CODE_END,CODE_INTERUPT,ARGUMENTS,DURATION,PRIORITY,REMOVE,SHOW_UNCON] call bis_fnc_holdActionAdd; I'm still new to scripting :lol:... Share this post Link to post Share on other sites
jmbo 0 Posted July 12, 2017 I know this thread has been dead for quite some time, but since I'm not allowed to create a new thread yet, I hope this might be the right place to ask for help. I'm working on a mission where you have to confirm the identity of a target, after you killed it with a hold action on the body. So I have a trigger, that checks if the target (o4) is alive and adds a holdAction once the target has been killed. This is what's in the "On Activation" field: [o4, "Confirm Identity", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {confirmed = 1}, {}, [], 5, 0, true, false] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true]; and once the global variable "confirmed" gets set to 1, a task gets completed. Now, everything works just fine when I test this mission in multiplayer from the editor. But when I hosted it on a dedicated server and tested it with a friend, the hold action was added 3 times to the dead body and holding it just made one of the actions disappear, leaving the task unfinished. Any help would be appreciated. Share this post Link to post Share on other sites
R3vo 2654 Posted July 13, 2017 You need to remove the action globally for all players. codeComplete = {confirmed = 1; [_this select 0,_this select 2 ] remoteExec ["removeAction",0] }; _this select 0 is the object the action is attached to and _this select 2 is the ID of the action. See if that works. Share this post Link to post Share on other sites
Boerstil 8 Posted July 13, 2017 If I understand you right. This should help: if (isServer) then { [o4, "Confirm Identity", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, {confirmed = 1}, {}, [], 5, 0, true, false] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true]; }; Share this post Link to post Share on other sites
jmbo 0 Posted July 13, 2017 @R3vo thanks for the reply, but not what I was looking for @Boerstil thanks, that fixed the problem with the holdAction being added multiple times, but the task still only gets finished when I host it in multiplayer. On my dedicated server nothing happens. I just have a trigger that checks if "confirmed == 1" which is synced to a SetTaskState module that sets the mission to complete. But this only seems to work, when I do not host the mission on a dedicated server. Share this post Link to post Share on other sites
R3vo 2654 Posted July 13, 2017 14 minutes ago, jmbo said: @R3vo thanks for the reply, but not what I was looking for @Boerstil thanks, that fixed the problem with the holdAction being added multiple times, but the task still only gets finished when I host it in multiplayer. On my dedicated server nothing happens. I just have a trigger that checks if "confirmed == 1" which is synced to a SetTaskState module that sets the mission to complete. But this only seems to work, when I do not host the mission on a dedicated server. missionNamespace setVariable ["confirmed",1,true]; Share this post Link to post Share on other sites
jmbo 0 Posted July 13, 2017 36 minutes ago, R3vo said: missionNamespace setVariable ["confirmed",1,true]; yes, that is what I was looking for. Everything works fine now. Thanks a lot to both of you! Edit: just noticed that you are the one who made 3den enhanced. awesome mod, I'm using it for every mission, great work! Share this post Link to post Share on other sites
Boerstil 8 Posted July 14, 2017 Does anyone know-how tog show the progressbar on The client being revived,? Like the ingame revive? Share this post Link to post Share on other sites
Ulfgaar 30 Posted August 26, 2017 On 15.11.2016 at 7:23 PM, Will_The_Gamer_PT said: Does anyone know how to make this hold action activate a trigger at the end. I used this code. Its a modified version of what i found in this topic #define TARGET _this #define TITLE "Search for intel" #define ICON "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa" #define PROG_ICON "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa" #define COND_ACTION "true" #define COND_PROGRESS "true" #define CODE_START {hint "Searching for intel..."} #define CODE_TICK {} #define CODE_END {hint "Intel found!"} #define CODE_INTERUPT {} #define ARGUMENTS [] #define DURATION 60 #define PRIORITY 1 #define REMOVE true #define SHOW_UNCON false [TARGET,TITLE,ICON,PROG_ICON,COND_ACTION,COND_PROGRESS,CODE_START,CODE_TICK,CODE_END,CODE_INTERUPT,ARGUMENTS,DURATION,PRIORITY,REMOVE,SHOW_UNCON] call bis_fnc_holdActionAdd; I'm still new to scripting :lol:... Guess you could make the code_end execute a SetDamage code to destroy/kill a small object or AI placed "elsewhere" on the map, and have the trigger work off that. Im new to this as well, but thats one possible "workaround" i guess. 2 Share this post Link to post Share on other sites
QuiveringT 11 Posted February 2, 2018 This is a great thread, but in case any others were having trouble with the specific implementation of the functions (i.e. what to put in the init lines, where to store the actual code), I have linked a great script here which works out of the box and should clear up any questions. In addition, it is very well written, so making changes for you specific purposes will not be a chore. 1 Share this post Link to post Share on other sites