Class AIAdoptGroupTargetNode
Behavior tree leaf that adopts the group's shared target. If the NPC belongs to an NPCGroup with a GroupTarget, this node sets the NPC's Target to match 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
-
ObjectScriptableObjectAIAdoptGroupTargetNode
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()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.nameObject.hideFlags
Methods
Evaluate(AIController)
Adopts the group's target as this NPC's target. Returns Success if the group has a target and it was adopted, Failure otherwise.
public override AINodeResult Evaluate(AIController controller)
Parameters
controllerAIControllerThe AI controller of the evaluating NPC.
Returns
- AINodeResult
Success if the group target was adopted, Failure if no group or no group target.