Jump to content
Zjajo

Make 3rd task "assigned" when preceding task not completed yet?

Recommended Posts

In my mission, I have task2 set to "assigned" after the completion of task1. During task2, I have task3 set to "assigned" once a trigger is activated, even though task2 is not complete (not failed either). The problem is that task3 is not assigned unless the player opens the map to manually assign it. How can I get task3 to auto-assign even though task2 is not completed? 

 

 

P.s. - After the completion of task3, is it possible to reassign task2? Or make it active again?

 

Edited by Zjajo
Corrected title

Share this post


Link to post
Share on other sites
3 minutes ago, JohnKalo said:

This should help run through triggers:

 

https://community.bistudio.com/wiki/setTaskState

 I'm currently using setTaskState modules to trigger task "success" but I cannot figure out how to set a new task to "assigned" when preceding task is not completed yet, and I've tried several different combinations of setTaskState.

  • Like 1

Share this post


Link to post
Share on other sites

@Zjajo,

Like this,

[true,["task2"],["Default Task","Task","object"],objNull,1,3,true] call BIS_fnc_taskCreate; // this is the task you create
["task2","ASSIGNED"] call BIS_fnc_taskSetState; // sets the task state assigned

"task2" call BIS_fnc_taskSetCurrent // makes current task

You could return to the previous task with the final line again.

 

Have fun!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
3 minutes ago, wogz187 said:

@Zjajo,

Like this,


[true,["task2"],["Default Task","Task","object"],objNull,1,3,true] call BIS_fnc_taskCreate; // this is the task you create
["task2","ASSIGNED"] call BIS_fnc_taskSetState; // sets the task state assigned

"task2" call BIS_fnc_taskSetCurrent // makes current task

Have fun!

Hey! I think that's exactly what I'm looking for. The taskSetCurrent function. I've googled for a few hours and didn't even come across that. Thanks a bunch! I'll give a try a soon as I can and report back.

Share this post


Link to post
Share on other sites

@wogz187,

Is BIS_fnc_taskSetCurrent only usable at task creation? This worked when I created task3, before task2 was completed, but would not reassign task2 after task3 is completed.

 

What I'm doing is:

-- task2 is created and assigned

-- while task2 is currently assigned and incomplete, the player activates a trigger which creates and assigns task3 (BIS_fnc_taskSetCurrent worked properly here and made task3 the active task just like I wanted) Thanks! 

-- Now, after task3 is completed, I want to make task2 active again, and I'm trying this by setting a trigger to a specific object !alive and "On activation" set to "task2" call BIS_fnc_taskSetCurrent;   --but task2 is never made active again.

 

Any thoughts?

Share this post


Link to post
Share on other sites
18 minutes ago, wogz187 said:

@Zjajo
may we have a screenshot of your trigger?

 

https://imgur.com/a/kIRC0th

Countdown is set to 2 seconds

Edited by Zjajo
Additional info

Share this post


Link to post
Share on other sites

@Zjajo
You previously used something like "deleteVehicle task3_successobject"?

Share this post


Link to post
Share on other sites
Just now, wogz187 said:

@Zjajo
You previously used something like "deleteVehicle task3_successobject"?

@wogz187,

Correct. On completion of task3, task3_successObject is deleted, which is supposed to be what triggers task2 reassignment. I have also confirmed that the object has been deleted via debug console commands.

I've tried a few different ways to make this work, even in a script, but still can't seem to get it to do what I'd like.

Share this post


Link to post
Share on other sites

SOLVED:

 

BIS_fnc_taskSetCurrent worked fine when I created a "mock" mission for testing the function. I don't know why it isn't working for me in my actual mission. I'll have to dig through the tasks and triggers, again, to see what I've done wrong.

 

@wogz187,  Thanks for your help!

  • Like 2

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

×