I've been trying to get the "Surround" task in particular working. There have been a few hiccups, but I believe I have resolved some of the issues. Now the biggest issue I seem to be having is I'm getting a StackOverflow error when I'm trying to determine the leader. I'm currently using:
Unity Version 2019.4.33f1
BD ver. 1.7.2
Tactical Pack ver. 1.3.1
Had to shorten it a little because it just kept repeating and could not copy/past the whole thing without going over the text limit.
I also tried removing the check to see who is the leader and just ran each agent with the leader variable set to the leader from "Find" and it provides me with a nullreference error.
Finally, I tried running all of the agents with the leader variable set to null and just each using themselves as a leader and got a LITTLE closer. They first sort of run from the bear (Which I'm assuming is trying to get to surround distance? - Just double checked and reduced the radius and this does seem to be the case.) then come back in to get in attack range. They are calling attack and everything fine, but they are kinda jittery, and if they aren't looking at the target, they rotate towards it very jittery as well.
Here is the behavior tree that I am using for this section. As of right now, it should be finding a game object with a specific name (Method will probably change a bit once I get this figured out, but just setting it from there was enough to get it going.) Then it checks to see if the current object is the leader and, if it is, runs the Surround task without a leader. If it is not the leader, it runs the next branch with the leader variable that was set by "Find" as the leader.
Unity Version 2019.4.33f1
BD ver. 1.7.2
Tactical Pack ver. 1.3.1
Had to shorten it a little because it just kept repeating and could not copy/past the whole thing without going over the text limit.
C#:
StackOverflowException: The requested operation caused a stack overflow.
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) <0x23cebb0ba20 + 0x00037> in <e395ed1557354db1a729173c553a159b>:0
UnityEngine.Object.op_Equality (UnityEngine.Object x, UnityEngine.Object y) (at <e395ed1557354db1a729173c553a159b>:0)
BehaviorDesigner.Runtime.Tactical.Tasks.TacticalGroup.AddAgentToGroup (BehaviorDesigner.Runtime.Behavior agent, System.Int32 index) (at Assets/Behavior Designer Tactical/Scripts/TacticalGroup.cs:194)
BehaviorDesigner.Runtime.Tactical.Tasks.NavMeshTacticalGroup.AddAgentToGroup (BehaviorDesigner.Runtime.Behavior agent, System.Int32 index) (at Assets/Behavior Designer Tactical/Scripts/Tasks/NavMeshTacticalGroup.cs:113)
BehaviorDesigner.Runtime.Tactical.Tasks.Surround.AddAgentToGroup (BehaviorDesigner.Runtime.Behavior agent, System.Int32 index) (at Assets/Behavior Designer Tactical/Scripts/Tasks/Surround.cs:29)
BehaviorDesigner.Runtime.Behavior.SendEvent[T,U] (System.String name, T arg1, U arg2) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.Tactical.Tasks.TacticalGroup.AddAgentToGroup (BehaviorDesigner.Runtime.Behavior agent, System.Int32 index) (at Assets/Behavior Designer Tactical/Scripts/TacticalGroup.cs:202)
I also tried removing the check to see who is the leader and just ran each agent with the leader variable set to the leader from "Find" and it provides me with a nullreference error.
C#:
NullReferenceException: Object reference not set to an instance of an object
BehaviorDesigner.Runtime.Tactical.Tasks.Surround.OnUpdate () (at Assets/Behavior Designer Tactical/Scripts/Tasks/Surround.cs:70)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunParentTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32& stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus status) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.Tick (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.Tick () (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager+<CoroutineUpdate>c__Iterator1.MoveNext () (at <3ed82e893f584901a16bc2e097c74b57>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e395ed1557354db1a729173c553a159b>:0)
Finally, I tried running all of the agents with the leader variable set to null and just each using themselves as a leader and got a LITTLE closer. They first sort of run from the bear (Which I'm assuming is trying to get to surround distance? - Just double checked and reduced the radius and this does seem to be the case.) then come back in to get in attack range. They are calling attack and everything fine, but they are kinda jittery, and if they aren't looking at the target, they rotate towards it very jittery as well.