peetlepapers
New member
I am trying to create a custom composite task that will allow me to select a gameobject from a list that satisfies all the child tasks. In the case where there are multiple gameobjects that satisfy the conditions, the task can be configured to return either the first one that succeeds, a random one, the closest one, etc.

In this example I want to update the target player by iterating over the list of players, and finding the ones that are alive, have a backpack, and are close enough to the enemy. Then the "Pick Object In List" task should pick one of the results based on the condition (first, random, closest, etc) and return success, or return failure if no player satisfies the conditions.
I am currently trying to use a dynamic variable that is set by the parent task to an element of the list for the children tasks to evaluate against. The documentation for composite tasks is virtually non-existant though so this is proving to be a big headache.
Is there a better way to do this within the existing framework? or could you provide guidance on how to implement this sort of composite iterator task?

In this example I want to update the target player by iterating over the list of players, and finding the ones that are alive, have a backpack, and are close enough to the enemy. Then the "Pick Object In List" task should pick one of the results based on the condition (first, random, closest, etc) and return success, or return failure if no player satisfies the conditions.
I am currently trying to use a dynamic variable that is set by the parent task to an element of the list for the children tasks to evaluate against. The documentation for composite tasks is virtually non-existant though so this is proving to be a big headache.
Is there a better way to do this within the existing framework? or could you provide guidance on how to implement this sort of composite iterator task?