Table of Contents

Class AIAdoptGroupTargetNode

Namespace
FishMMO.Server.Implementation.World.SceneServer.AI
Assembly
FishMMO.Server.dll

Behavior tree leaf that adopts the pack's focus. If the NPC belongs to an NPCGroup whose GroupTargetCharacter is a living target, this node sets the NPC's Target to it and returns Success.

Use case: "Focus the tank's target" → place this before a StateTransition to AttackState.

[CreateAssetMenu(fileName = "New AI Adopt Group Target Node", menuName = "FishMMO/Character/NPC/AI/Behavior Tree/Adopt Group Target Node")]
public class AIAdoptGroupTargetNode : AIBehaviorNode
Inheritance
Object
ScriptableObject
AIAdoptGroupTargetNode
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.MemberwiseClone()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Methods

Evaluate(AIController)

Adopts the pack's focus as this NPC's target. Returns Success if there is a living focus and it was adopted, Failure otherwise.

public override AINodeResult Evaluate(AIController controller)

Parameters

controller AIController

The AI controller of the evaluating NPC.

Returns

AINodeResult

Success if the focus was adopted, Failure if there is no pack, no living focus, or the NPC is evading.

Remarks

Fails for an evading NPC. A leash that ends a fight makes the walk home an evade, and a node that handed an evading NPC a target — for the next node to send it into its attacking state — would be the same way back into the fight that ForceTarget(ICharacter) and every threat path refuse.

The focus is the pack's identity-checked character, validated as a target: it used to be a bare transform, adopted whether it was dead, despawned or re-issued by the pool to someone else.