C.T.B Creations 0 Posted March 27, 2020 So I've been making a mission where you crashed in a helicopter and now you are in the middle of the Tanoa Jungle and have to get off the smaller island but Captain Adams orders you to search some CSAT buildings/camps while you are at it for some intel. but when you get to the first campsite, Cpt. Adams orders you to retreat because CSAT called in for backup and now you have a change of plans. The side chat text shows up when you walk into a trigger but can I make that trigger also cancel the current task (which is to infiltrate the campsite) Share this post Link to post Share on other sites
gc8 970 Posted March 27, 2020 yes, with: [yourTaskIdHere,"CANCELED"] call BIS_fnc_taskSetState; Share this post Link to post Share on other sites
C.T.B Creations 0 Posted March 27, 2020 9 minutes ago, gc8 said: yes, with: [yourTaskIdHere,"CANCELED"] call BIS_fnc_taskSetState; in the trigger? (sorry, I'm new to this xD) Share this post Link to post Share on other sites
gc8 970 Posted March 27, 2020 8 minutes ago, C.T.B Creations said: in the trigger? (sorry, I'm new to this xD) yea I believe so I haven't used much triggers and task modules because I always put everything in script files :) but hopefully some one can help you there Share this post Link to post Share on other sites
C.T.B Creations 0 Posted March 27, 2020 1 minute ago, gc8 said: yea I believe so I haven't used much triggers and task modules because I always put everything in scripts 🙂 but hopefully some one can help you there ok i understand. i'll try. Thank you tho. I suck at scripts and stuff and tutorials doesn't help 😞 xD Share this post Link to post Share on other sites
C.T.B Creations 0 Posted March 27, 2020 29 minutes ago, gc8 said: yes, with: [yourTaskIdHere,"CANCELED"] call BIS_fnc_taskSetState; "[X] Task ID cannot be an empty string" is all it says 😞 Share this post Link to post Share on other sites
gc8 970 Posted March 27, 2020 Well assuming you are using the task module in editor to start your task then you should also define the "task ID" in the task module properties. Then you put that "task ID" to the code I posted. and then you put the code I posted to triggers "on activation" field so if your task ID is: myTask then your code is: [myTask,"CANCELED"] call BIS_fnc_taskSetState; Share this post Link to post Share on other sites
C.T.B Creations 0 Posted March 27, 2020 1 9 minutes ago, gc8 said: Well assuming you are using the task module in editor to start your task then you should also define the "task ID" in the task module properties. Then you put that "task ID" to the code I posted. and then you put the code I posted to triggers "on activation" field so if your task ID is: myTask then your code is: [myTask,"CANCELED"] call BIS_fnc_taskSetState; still the same error. My TaskID is Infiltrate on the Create Task module. and my Set Task State Module is on Succeeded. is something wrong there? oh and in the 5x5x5 trigger i put "[Infiltrate,"CANCELED"] call BIS_fnc_taskSetState;" on "On Activation" Share this post Link to post Share on other sites
gc8 970 Posted March 27, 2020 Hmm hard to say, maybe syntax error. hope someone can help you Share this post Link to post Share on other sites
C.T.B Creations 0 Posted March 27, 2020 Just now, gc8 said: Hmm hard to say, maybe syntax error. hope someone can help you i appreciate the help tho 😄 Share this post Link to post Share on other sites
opusfmspol 273 Posted March 27, 2020 2 hours ago, C.T.B Creations said: [Infiltrate,"CANCELED"] call BIS_fnc_taskSetState; Check BIS_fnc_taskSetState in functions viewer. Task is supposed to be a string. "Infiltrate" Share this post Link to post Share on other sites
Larrow 2794 Posted March 30, 2020 On 3/27/2020 at 6:46 PM, C.T.B Creations said: My TaskID is Infiltrate on the Create Task module As you are using the task modules. Add a Set Task Module, set it to cancelled, sync it to Create Task Module, also sync it to the trigger that fires when you want it to cancel. Example Going to the Green arrow Succeeds the task. Going to the Red arrow Cancels the task. Share this post Link to post Share on other sites