Jump to content
Sign in to follow this  
forzajuve

BIS_fnc_deleteTask;

Recommended Posts

I am trying to delete a task. 

 

My code is 

["tsk2"] call BIS_fnc_deleteTask; 

on activation in trigger.

 

However it is not deleting the task... I also tried deleting the trigger which activates the task however that just assigns the task instantly. Not sure what's wrong...

Share this post


Link to post
Share on other sites

We'll need to see more info about how you've created the tasks first please. :)

Share this post


Link to post
Share on other sites

Ok, the task is to hide a vehicle. However if the vehicle is destroyed I would like to delete this task as the player won't be able to complete this objective and get into a locked building. This would be bypassed. 

 

The task is assigned by entering a trigger area. I've checked it's all working fine, just the deleting is where the problem is.

Owner: All playable units
Task ID: tsk2
Title: Hide the truck
Description: Drive the truck to...
Marker: park
Destination: Module position
State: created
Task type: move
Always visible: disable

Share this post


Link to post
Share on other sites

Maybe try setting the state to Failed or Unavailable (is that an option?) with a SetTaskState module synced to the trigger instead of deleting it via scripts?

 

(I've never really had much luck with task modules and have always used SHK Taskmaster instead really.)

Share this post


Link to post
Share on other sites

There is cancelled, I guess I'll just make do with that and see if I can get that working. 

Share this post


Link to post
Share on other sites

I typically use the deleteVehicle command to get rid of multiple extra task state modules (for example if it can succeed, fail, or cancel and I don't want it doing all three as triggers are fired), but I don't know that I've ever tried it on the actual task itself. Might be worth a shot.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×