Nikoladis 12 Posted September 16, 2019 I would like to allow players to cancel tasks. I know it can be done cause I have seen missions where tasks can be canceled. But my tasks, which is made by modules cannot be canceled by players, they simply dont get the option. Share this post Link to post Share on other sites
wogz187 1086 Posted September 16, 2019 @Nikoladis, You can add a cancel task hold action to the action menu, cancelTask=[ player, "Cancel Task", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "alive player", "alive player", {}, {}, { _this setTaskState "canceled"; }, {}, [], 2, 0, false, true ] call BIS_fnc_holdActionAdd; Have fun! 1 Share this post Link to post Share on other sites
Nikoladis 12 Posted September 17, 2019 Thank you for the reply. However I am not sure where to put that code. Should it work with tasks that are made as modules also? Should it pop up in the menu for the player that comes up when I use mouse scrollwheel? Share this post Link to post Share on other sites
Larrow 2822 Posted September 17, 2019 You can do it in the createTask module by placing... <execute expression="[ 'task_1', 'CANCELED' ] call BIS_fnc_taskSetState">CANCEL</execute> ..in the description box. Where 'task_1' is the taskID. Or from script. 1 Share this post Link to post Share on other sites
Nikoladis 12 Posted September 17, 2019 That is so nice, exactly what I was looking for, thanks. Share this post Link to post Share on other sites