Best explaination of this is found in the API.
- [ReceiveExecute][1]
- [ReceiveExecuteAI][2]
If both generic and AI event versions are implemented, then only the more suitable one will be called. Meaning the AI version if the pawn is AI controlled, generic one otherwise.
Remember though, if only one is implemented, then that will get called.
In the C++ engine source, you can find the exact trigger for the differences.
-
[Engine/Source/Runtime/AIModule/Private/BehaviorTree/Tasks/BTTask_BlueprintBase.cpp line 55][3]
if (AIOwner != nullptr && //…
{
ReceiveExecuteAI( //…
}
else if ( //…
{
ReceiveExecute( //…
}
[1]: UBTTask_BlueprintBase::ReceiveExecute | Unreal Engine 5.2 Documentation
[2]: UBTTask_BlueprintBase::ReceiveExecuteAI | Unreal Engine 5.2 Documentation
[3]: https://github.com/EpicGames/UnrealEngine/blob/4.16/Engine/Source/Runtime/AIModule/Private/BehaviorTree/Tasks/BTTask_BlueprintBase.cpp#L55