Hi
Im looking for a way to reference a spawned object and make an array from it.
I have a blueprint that spawns a tower, in the blueprint there is a widget that spawns above the tower.
the widget has buttons to change the material of the tower.
my problem is that when i have multiple towers in the level the buttons only effect the first tower that was spawned.
now i have been googling for hours on how to make it effect the tower it belongs to and have learnt the following.
- i need to make an array.
- when a new tower is spawned it needs to be added to the array.
- the widget for that tower needs to get the reference for the tower it spawned with.
but finding what i need still eludes me.
the first image is what i have in the widget to change the materials.
the second is the towers with the widgets above.
i am not good at blueprints, im trying to learn by making a simple tower defense game.
so i am 100% certain that the answer is out there already, but i lack the correct search terms to find what i need.
so if some kind soul could point me in the right direction that would be great.