Smart Object Owner nullptr in onTriggeredCharacter

Hi there, first post - hope I used the right tags and so on.

Anyway, I am currently working on Enemy AI with State Trees and Smart Objects.
Upoin working with the Gameplay Behavior for my Smart Object i wanted to get the Objects reference by using the corresponding node fgrom the OnTriggeredCharacter Event.

Problem now: it only returns Null and i have searched through the source code and couldn’t find at which point the reference is set.

if anyone finds something i would be really greatful.

Regards

3 Likes

Hey there, if you’re still stuck here, and you are building the engine from source, then you can change line 191 of Engine\Plugins\Runtime\SmartObjects\Source\SmartObjectsModule\Private\AI\AITask_UseSmartObject.cpp to

bBehaviorActive = UGameplayBehaviorManager::TriggerBehavior(*GameplayBehavior, *OwnerController->GetPawn(), GameplayBehaviorConfig, SmartObjectSubsystem->GetSmartObjectComponent(ClaimedHandle)->GetOwner());
This will populate the Smart Object Owner parameter