i am finding solution for our project. I have 30 buttons (widget) every button has its own different model to spawn. I want to have only one spawn place on map and always only one object, so if i choose one button from 30 object will spawn on specific place, when i push another button, old object will disappear and new will spawn on same place.
Hi, it i use this setup for spawn BP its working but its not destroyed after i used another button. Is it right also for spawn BP or there is another aproach to use it to spawn more actors and destroy them after load new under another button?
But i have mony buttons and selection of them is by user so i dont which one they will use to replace old. And every BP has special locaction where is spawned thats why i cant use array i think, am i right?
I don’t understand what you’re making. I don’t know the rules of your game. I don’t know how you pass location data and who spawn whom following which rules…
If you need help with something so specific, ensure you include plenty of detail.
But i have mony buttons and selection of them is by user so i dont which one they will use to replace old.
What does the above even mean? Perhaps describe the gameplay feature from the player’s perspective.
I have menu where user select one of for example 100 buttons, every button spawn 3 different BP - models on tree locacions, lets say location 1, location 2 and location 3. Every button spawn on same location but different models. So all location stay same, only models are changing. For models i used BP because they are spawned with special widget so i cant only call static mesh to appear. Soi i used sequencer to connect spawning of all three BP with models and add DestroyActor, meaning of it its when u select on menu (menu on the wall in VR) another button, old models (BP of them) will disappear and new will load. Another button look same but only spawned models are different. MOdels is represented by BP13639_1,2,3 in this case
if u select first time selected button everythink is fine, but if u select next one, old models stay and next apper also so two models in together, i want that if u select next button old setup will be destroyed and only new models will apear. The problem is only in destroying old BPs
yes for menu has one BP with all menu buttons, for every button i have another 3 BP with models. Its not working even if i use only one BP without sequencer
Each button calls a custom event and you can pipe in the data you need. Actor classes and locations. Before anything is spawned, we destroy actors and clear the array.
This could probably be scripted better depending on the scope and what else needs to be done later on. Hard to tell at this point. And if the editor complains about passing an array of classes:
one more question to this BP, everything is set but i cant connect Var 1,2,3 to same Make Array - its always mark only first and next is not compatible. Do you know what is the problem in?
destroy actor problem.PNG
destroy actor problem.PNG1920Ă—872 114 KB
I have still same problem, old BP isnt destroyed. Any idea about this type of code? I will try now the first aproach what u send to me, but it seems to be more complicated for me.