# How do i store multiple locations into a single variable easily?

**URL:** <https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165>\
**Category:** Blueprint\
**Tags:** Variable, matrix, actor-location, unreal-engine, vector, Blueprint, question\
**Created:** [February 16, 2026, 9:05pm UTC](https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165 "2026-02-16T21:05:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DravenMalak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DravenMalak](https://forums.unrealengine.com/u/DravenMalak)\
**Post date:** [February 16, 2026, 9:05pm UTC](https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165/1 "2026-02-16T21:05:37Z")

</div>

I don’t want certain meshes to exist in the level by default. I know I can hide/unhide, but that wont work here. I want them to appear in a random location when they are needed. I am trying to create a vector matrix to store the locations I want. The level has objects placed in the locations i want to use. Is there a way to select multiple objects in your level and create a matrix of their locations without having to copy/paste each location individually?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [February 16, 2026, 11:06pm UTC](https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165/2 "2026-02-16T23:06:08Z")

</div>

you can use an editor widget.  
a bpfl.  
you can store them in a data table (recommended), or a data asset.  
or what most people would do, is to have actors with nothing on them just a scene component. and place them in the places you want things to appear.  
then on begin play or smth you GetAllActorsOfClass with that class.  
then you choose at random.  
then you call SpawnActor.

---

<div class="post-metadata">

**Author:** ![Cestarian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cestarian](https://forums.unrealengine.com/u/Cestarian)\
**Post date:** [February 17, 2026, 5:49am UTC](https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165/3 "2026-02-17T05:49:42Z")

</div>

How about a map?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/9/18949002e13f4f7093dc51cfde2a4c0927941411.png)

Works a lot like an array.

The data table approach recommended by nande is probably superior long term (if this is something you need to do a lot) and better for project structure, but if you’re just prototyping setting up a map is simpler and faster.

---

<div class="post-metadata">

**Author:** ![AHX2134](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AHX2134](https://forums.unrealengine.com/u/AHX2134)\
**Post date:** [February 23, 2026, 5:13pm UTC](https://forums.unrealengine.com/t/how-do-i-store-multiple-locations-into-a-single-variable-easily/2700165/4 "2026-02-23T17:13:39Z")

</div>

Map is quicker for simple storage and data table is better if you have a lot of stuff
