How to access a variable from a trigger box class

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