# How do I spawn a trigger box only after having a variable?

**URL:** <https://forums.unrealengine.com/t/how-do-i-spawn-a-trigger-box-only-after-having-a-variable/500804>\
**Category:** Blueprint\
**Tags:** triggerbox, unreal-engine, UE4, question, UE4-27, Blueprint\
**Created:** [February 22, 2022, 3:19am UTC](https://forums.unrealengine.com/t/how-do-i-spawn-a-trigger-box-only-after-having-a-variable/500804 "2022-02-22T03:19:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kimmeey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kimmeey](https://forums.unrealengine.com/u/Kimmeey)\
**Post date:** [February 22, 2022, 3:19am UTC](https://forums.unrealengine.com/t/how-do-i-spawn-a-trigger-box-only-after-having-a-variable/500804/1 "2022-02-22T03:19:24Z")

</div>

I am trying to spawn a trigger box that will have a delay before killing the player character if they don’t exit the area fast enough, but the player should be able to approach the door without the trigger box activating unless they have a key which will activate a variable.

---

<div class="post-metadata">

**Author:** ![MilionX](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/milionx/32/1194703_2.png) [@MilionX](https://forums.unrealengine.com/u/MilionX)\
**Post date:** [February 22, 2022, 4:46am UTC](https://forums.unrealengine.com/t/how-do-i-spawn-a-trigger-box-only-after-having-a-variable/500804/2 "2022-02-22T04:46:48Z")

</div>

your trigger box set default to active. or deactive…  
then, when u got a key. find the ref of trigger box use get actor by tag, by class, etc. then set to active.
