# Smart Object Owner nullptr in onTriggeredCharacter

**URL:** <https://forums.unrealengine.com/t/smart-object-owner-nullptr-in-ontriggeredcharacter/548841>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 4, 2022, 5:12pm UTC](https://forums.unrealengine.com/t/smart-object-owner-nullptr-in-ontriggeredcharacter/548841 "2022-05-04T17:12:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![7Bibabutzemann7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@7Bibabutzemann7](https://forums.unrealengine.com/u/7Bibabutzemann7)\
**Post date:** [May 4, 2022, 5:12pm UTC](https://forums.unrealengine.com/t/smart-object-owner-nullptr-in-ontriggeredcharacter/548841/1 "2022-05-04T17:12:06Z")

</div>

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

 ![UE5SOproblem.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/9/2190c647089d428c74b144ea84cc0f7d81eeb3b6.jpeg)

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [August 15, 2022, 1:21pm UTC](https://forums.unrealengine.com/t/smart-object-owner-nullptr-in-ontriggeredcharacter/548841/2 "2022-08-15T13:21:30Z")

</div>

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
