# How to access a variable from a trigger box class

**URL:** <https://forums.unrealengine.com/t/how-to-access-a-variable-from-a-trigger-box-class/477929>\
**Category:** C++\
**Tags:** box-trigger, unreal-engine, question, CPP\
**Created:** [January 28, 2021, 6:12pm UTC](https://forums.unrealengine.com/t/how-to-access-a-variable-from-a-trigger-box-class/477929 "2021-01-28T18:12:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KielanT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KielanT](https://forums.unrealengine.com/u/KielanT)\
**Post date:** [January 28, 2021, 6:12pm UTC](https://forums.unrealengine.com/t/how-to-access-a-variable-from-a-trigger-box-class/477929/1 "2021-01-28T18:12:07Z")

</div>

Hi, I have trigger box c++ class which when the player moves through it, it sets a variable to true. I want to be able to access this variable outside of the class in my AI controller cpp. How would I do this?

Thank you
