Spawning Objects with Array

Hello,

I’ve been trying to create a minimap which can be set with maxX and MaxZ (setting the numbers up, and then adding those tiles made into an array) The problem is that I want to get a specific number (like 2) and set a specific mesh for that tile.

Picture below is how I spawn the minimap with just plain tiles. I want it so i can switch out each tile with a different one.

Many Thanks
Mrfantasticghost

Create an array of StaticMeshComponents and add the spawned tiles to it , and then you can access to those tiles by index

Just a comment: There is a really good functioning Minimap on the Marketplace:

https://www.unrealengine.com/content/f7569b75555146fd83660f44cc3904d1

Maybe you want to check that out if you can’t find any help (:

Yeah I got the static mesh component set up in an array. Could you possible show how I would setup the blueprint to get the index of the Tile Map and then set the index to corresponding static mesh in the array?

I want to make a Super Metriod inspired minimap and I don’t have much money ahaha :slight_smile:

you want to select a tile and get it index?

Get its Index

use this node

55476-test61.png

Then how would I reference it to the Index in my TileMap Array?