I have a BP Switch placed in the level that opens a UMG (with 3 buttons, A, B, C) to spawn a BP Building (A, B, C Building). I have several of these BP Switches around the level. When I press the UMG button, it calls spawn (buildingtypeA B or C) from the game instance.
But my issue is that it is spawning the selected building at all Switch locations, rather than just the one that I am interacting with.
Is there a way to spawn the BP building of choice just at that instance?
Basically I have an RTS-style interface where I want to spawn specific buildings at specific locations.
Where is the “Cube 1” Component Actually located? Its possible the build function is firing to each Actor that contains it, resulting in buildings at every location. If that’s the case, you’ll have to give them specific identifiers/associations and check them.
So your current UMG Widget is effectively calling the Build function on all instances of the spawner at once, resulting in the same building being spawned at every Spawner’s “Cube 1” Component transform at the same time.
You’ll have to add some sort of method of identification like this. Add an Instance Editable Int Variable that you can change from the outliner after placing the Spawner BP, then from the UMG Widget, Check for that specific Spawner’s ID and get that Spawner’s Cube1 Component Transform.