Download

Blueprint to spawn other blueprints when placed in world then self delete

So far what I made and it’s not working is this on the pictures. What I expected is to place 5 of the blueprints called “SC_ShrubMove” at the location of where I place this main blueprint called “Bush_SC_ShrubMoveBP”. However it doesn’t spawn any other blueprints. It would be great if it’s possible I will explain what am I exactly trying to acheive.
I will also need the main blueprint to delete itself after it spawn but I dont know what nodes to use for this.

What I want is to make thing like from a game editor where you dont spawn one by one bushes but many at once, and then be able to move them individually - so each bush to be blueprint, and this main blueprint that spawns the bushes to delete intself right after the bushes spawns. Later I know how to make them spawn in random location around the point but the first problem is they dont spawn at all, and second problem is I dont know how to delete the spawning blueprint. How to do both?

Edit: The variable “How Many Bushes?” is set to 5

Is the Destroy Actor node what I need?

You can’t spawn from the construction script. You need to use AddComponent:


ezgif.com-gif-maker.gif

If I add component all components remain as a single blueprint and from there on I cant individually modify one of the components. So if I use this blueprint in a editor and the user spawns 6 trees but he doesnt like a specific one how can he move or remove it ?

Something I have yet to get into myself… but isn’t this something Blutility can do?

Use Begin play to call Spawn Blueprint.
When your For Loop Completes (completed pin) use Delay (0.2) -> Destroy Actor (self)

What sort of user are you talking about. Will this be an editor utility, or is a game thing?

editor utility

i know nothing about blutility, really i think my nodes are set correct but they dont work

i also forgot to try simulation to see where the work breaks, sometimes my simulation doesnt work at all and i have no clue why but i will try this soon

You want a Blutility. Blueprint Utilities (Blutilities) | Unreal Engine Documentation

A regular BP class won’t do what you want.

what exactly is it from the description it seems like pack of new nodes and setups

if my setup allows me to spawn static meshes inside the same blueprint but instead im unable to spawn blueprints then the problem is in the software only

if im wrong do u know exactly what should i do with blutility to spawn blueprints whenever i place a blueprint in the world

Based on your opening post…

Your “want” could be two different things.

If you want the “Player” to be able to spawn bushes (bp actor class) and then move them (game play mechanic), then you can use blueprints. Simply code the ability to the character. Once spawned use a line trace to select the individual bush. Once selected use another line trace to move/teleport the bush to the new spot (2nd trace hit location), after move deselect.

If you want this as “Level Designer/Dev” functionality, then use Blutility to add the customization to the editor.

This will do great i was thinking about ue4 as a editor itself for me but i should make them moveable for the player not for what i see when editing you are right