# Trigger Box spawning in a loop. How to get location of a specific Trigger Box?

**URL:** <https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942>\
**Category:** Audio\
**Tags:** triggerbox, spawn-actor, unreal-engine, loop, Blueprint, question\
**Created:** [July 27, 2017, 12:04am UTC](https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942 "2017-07-27T00:04:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b88a645e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b88a645e](https://forums.unrealengine.com/u/anonymous_user_b88a645e)\
**Post date:** [July 27, 2017, 12:04am UTC](https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942/1 "2017-07-27T00:04:14Z")

</div>

Hey guys,  
I created a trigger box blueprint class and I spawned several Trigger boxes on my map (via a loop and Spawn Actor). Now that I have only one blueprint class, I want to know exactly to which trigger box I’m talking because every Trigger Box has it’s own logic. How to find out which trigger box am I “talking to”? How can I get the location of a trigger box (that would be a possibility) or is there an even easier way to find out?

Cheers!

---

<div class="post-metadata">

**Author:** ![TunaCoronation](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tunacoronation/32/590534_2.png) [@TunaCoronation](https://forums.unrealengine.com/u/TunaCoronation)\
**Post date:** [July 28, 2017, 8:51am UTC](https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942/2 "2017-07-28T08:51:09Z")

</div>

First thing that comes to mind: assign an integer “ID” to every TriggerBox on Spawn. You can now get the ID from every TriggerBox and know exactly which instance of the BP you are working with.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b88a645e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b88a645e](https://forums.unrealengine.com/u/anonymous_user_b88a645e)\
**Post date:** [July 28, 2017, 11:11am UTC](https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942/3 "2017-07-28T11:11:13Z")

</div>

Hi Q-tro,  
this is a good suggestion! I’ve already solved this problem yesterday but your suggestion sounds good! Sorry if I bothered your time!

Cheers!

---

<div class="post-metadata">

**Author:** ![script526](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@script526](https://forums.unrealengine.com/u/script526)\
**Post date:** [December 28, 2018, 2:05pm UTC](https://forums.unrealengine.com/t/trigger-box-spawning-in-a-loop-how-to-get-location-of-a-specific-trigger-box/397942/4 "2018-12-28T14:05:44Z")

</div>

Also you can pass these integers into an array and iterate through them using ForEachLoop node.
