Page MenuHomeFeedback Tracker

child task will not close out when parent succeeds.
Reviewed, NormalPublic

Description

I am scripting out tasks using the createSimpleTask commands, and when I create a child task of a parent task, the child will not succeed or close out when the parent succeeds. I covered this in the ARMA 3 editing and scripting forum and multiple users are reproducing the same error, the thread with all codes and troubleshooting steps is posted below.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
Additional Information

Event Timeline

ticket 123456!!! yes, you are reading this correctly :D

razazel claimed this task.Feb 21 2017, 12:59 PM
razazel changed the task status from New to Need More Info.
razazel added a subscriber: razazel.

Hello,

thanks for the info.

Would it be possible to provide a simple repro mission to demonstrate the bug?

Thanks

Thank you very much :)

In the provided mission, I move a rifleman, unit1, to one of two markers near the player. You can see that the child tasks are search left and search right. If you walk onto a marker that doesn't contain unit1, a trigger cancels that particular simpletask child. If you then walk over to the other marker where unit1 is, the trigger will not cancel the task (though I could technically succeed the child manually), but instead, a hint informs the player to recruit unit1. I have an addAction put on unit1 that allows you to recruit him. Once recruited into the player's group, a trigger fires and succeeds the parent task. You will see that the child tasks then DO NOT succeed with the parent. The child tasks remain until they are manually succeeded or removed via script. The BIS wiki apparently vouched for the behavior that succeeding a parent succeeds all children of the parent... at some point, hence I am making this bug report.

razazel changed the task status from Need More Info to Reviewed.Feb 21 2017, 2:36 PM

Hi there. Thanks for the repro mission, I checked it. The script commands you are using there provide basic functionality over simpleTasks. It is absolutely OK, if you use them directly. This way you get full control over your tasks, but also full responsibility over everything else, like is synchronization in MP or the above mentioned automated handling of child tasks according parent task state.

The script commands for simple tasks needs to state generic. Such quality of life improvement could help one guy but at the same time could create a nightmare for another.

If you want semi-intelligent behavior I suggest using the scripted task framework. It does what you need - when parent task is completed (fails, succeeds, is canceled) then all uncompleted tasks are set to state of the parent task. The task framework also handles quite efficiently MP synchronization.

If you need some special handling for several child tasks I suggest setting their task states before you set the parent task state or if even this is not acceptable for you for some reason, just script it yourself. The script commands give you full control over the tasks...

There are some links you might find useful (in case you are not familiar with them):
https://community.bistudio.com/wiki/Arma_3_Task_Framework
https://community.bistudio.com/wiki/Arma_3_Tasks_Overhaul

Note: Regarding the details about available functions and their parameters I strongly suggest to use the in-game Functions Manager. The information there will be most up-to-date and is easy to read - should be properly formatted.

Hi there. Thanks for the repro mission, I checked it. The script commands you are using there provide basic functionality over simpleTasks. It is absolutely OK, if you use them directly. This way you get full control over your tasks, but also full responsibility over everything else, like is synchronization in MP or the above mentioned automated handling of child tasks according parent task state.

The script commands for simple tasks needs to state generic. Such quality of life improvement could help one guy but at the same time could create a nightmare for another.

If you want semi-intelligent behavior I suggest using the scripted task framework. It does what you need - when parent task is completed (fails, succeeds, is canceled) then all uncompleted tasks are set to state of the parent task. The task framework also handles quite efficiently MP synchronization.

If you need some special handling for several child tasks I suggest setting their task states before you set the parent task state or if even this is not acceptable for you for some reason, just script it yourself. The script commands give you full control over the tasks...

There are some links you might find useful (in case you are not familiar with them):
https://community.bistudio.com/wiki/Arma_3_Task_Framework
https://community.bistudio.com/wiki/Arma_3_Tasks_Overhaul

Note: Regarding the details about available functions and their parameters I strongly suggest to use the in-game Functions Manager. The information there will be most up-to-date and is easy to read - should be properly formatted.

I appreciate you trying to help, but I know all this. I made the ticket because Lou Montana's "verified comments" in https://community.bistudio.com/wiki/createSimpleTask

There is no mention of using the task functions, if he is mistaken, the biki needs to be updated to reference the correct task functions.

Hello (I'm late at the party),
my comment was valid when posted and was concerning Arma 2. It seems this behaviour changed in Arma 3, I then invite you to add your note.
My comment was about an observed behaviour at the time and is obviously not the official word for it ;-)