DanielGerberApps
Member
Hello! I currently have 2 AI agents that work independently and I'd like to put them on the same team. I've placed them on the same layer and switched both of their External Behavior trees from "Solo" to "Team" but I'm getting the following:
Is it necessary to "hard code" the target on the Behavior Tree component?
My real question: What is the fastest way to convert these agents from solo players to teammates?
Thanks!!
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Opsive.DeathmatchAIKit.TeamManager.SetLeaderInternal (UnityEngine.GameObject player, System.Boolean start) (at Assets/Opsive/DeathmatchAIKit/Scripts/Game/TeamManager.cs:209)
Opsive.DeathmatchAIKit.TeamManager.SetLeader (UnityEngine.GameObject player, System.Boolean start) (at Assets/Opsive/DeathmatchAIKit/Scripts/Game/TeamManager.cs:175)
Opsive.DeathmatchAIKit.AI.Actions.SearchForTarget.OnEnd () (at Assets/Opsive/DeathmatchAIKit/Scripts/AI/Actions/Attack/SearchForTarget.cs:153)
BehaviorDesigner.Runtime.BehaviorManager.PopTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus& status, System.Boolean popChildren, System.Boolean notifyOnEmptyStack) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.DestroyBehavior (BehaviorDesigner.Runtime.Behavior behavior, BehaviorDesigner.Runtime.Tasks.TaskStatus executionStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.DisableBehavior (BehaviorDesigner.Runtime.Behavior behavior, System.Boolean paused, BehaviorDesigner.Runtime.Tasks.TaskStatus executionStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.DisableBehavior (BehaviorDesigner.Runtime.Behavior behavior, System.Boolean paused) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.DisableBehavior (BehaviorDesigner.Runtime.Behavior behavior) (at <3ed82e893f584901a16bc2e097c74b57>:0)
BehaviorDesigner.Runtime.BehaviorManager.OnApplicationQuit () (at <3ed82e893f584901a16bc2e097c74b57>:0)
Is it necessary to "hard code" the target on the Behavior Tree component?
My real question: What is the fastest way to convert these agents from solo players to teammates?
Thanks!!