Separate BP via Construction Script

Is there t[link text][1]an example of “How to spawn separate Blueprints via Construction Scripts”?

Maybe I should deal with c++ instead?

ok I see what you are trying to do but I think you may be going about it wrong I am not sure.

If you have a bunch of OBJECTS in your level that have some thing in common like I saw in the video they all were square, on the floor, changed when you touched them and destroyed when you touched them again and you want to change the properties of what happens during those EVENTS you should be able to do all that with the one working blueprint.

So my guess is you tried to parent the blueprint which would work also if you have one blueprint being the BASE and then making children.

I should be able to help you with this if you can tell me what you are trying to do in the blueprints. You seem to have the right idea but you might be missing some key shortcuts or placement of nodes.

Thank you for immediate reply!

“…you should be able to do all that with the one working blueprint”
Yes, I use one working blueprint for everything called BP_Cell.
http://snag.gy/T7bBv.jpg (Pic.1)

(Now I start thinking that the Name of the topic is wrong.)
Maybe better would be:
How to make separate actors via Construction Scripts?

What I really need is to be able to move this BP_Cell in the scene only once to get as many actors as I need. For example grid 4x4. The size controlled by Variables (Pic.1 “Width X” and “Height Y” are for that) As you may know, that Construction Script is designed to do some sort of this problems.

This is what I get now, but it shoud be more like in Pic.1
http://snag.gy/HUPHz.jpg (Pic.2)

So what I trying to do is to make Construction script be able to place actors in the Scene to allow me to edit them in the editor.

“So my guess is you tried to parent the blueprint which would work also if you have one blueprint being the BASE and then making children.”
Not really understand what it means. Can you show me example?

New video explanation

Ah ok so I would use Two blueprints one you have then another to spawn them. That way each is a separate entity.

both actors?

I followed your advise and
created BP Actor “TEST” and via Construction Script called “Add ChildActorComponenet” twice.
But it is not useful because It is not possible to separate actors (selecting individual actor to tune it’s parameters)

You need to use SPAWN actor in the one blueprint with all of the placement information. So it will spawn the blueprint with the square and all its information.

By using add child component you are making it as a part of ONE actor and not separate entities.
You could do it that way but it would probably require a lot more tweaking to get it to operate correctly.

Unfortunately I can’t fine SPAWN any actor in Construction Script

By using add child component you are making it as a part of ONE actor and not separate entities. You could do it that way but it would probably require a lot more tweaking to get it to operate correctly.

How?

Oh ok sorry you would place this actor at depending on setup either the center or corner of your grid. The actual spawning would have to take place in the event graph but the construction part you would use to DEFINE how the grid would be laid out.

Yes.
Definitely useful but not in my case.
I have strong need to manipulate actors in the editor

You can edit and adjust in the editor you have to setup and expose parameters from the square blueprint to the placing blueprint.

I use a spawn blueprint to place pickup objects and I can define what they are, how big they are, color etc etc.

If you would need help to collaborate on this to get it to work I would be happy to try to help.
But I think if you grasp the concept you will see its very easy since you have a lot of the ground work already in place.

I use a spawn blueprint to place
pickup objects and I can define what
they are, how big they are, color etc
etc.

You defined it in the blueprint to see result in the GAME
But in my case it won’t work because I have to manually adjust things. I can’t write BP to adjust say 250000 squares. Maybe with using CSV tables to automate it - it can work. But still not ideal.

When I get functionality to separate actors in the EDITOR I would do some routine to import from file.

But I think that using SPAWNING in the GAME is sort of dog-nail.

If I understand your meaning correctly

I am sorry then I am at a loss for what you are trying to do. Simple thing Construction script is NOT for runtime it is for the initial state of how something will be before the level is started. Event graph makes things happen during runtime while the level is going.

if you are trying to edit stuff while in the gameplay then construction script will not help you.

I’m not trying to edit stuff while in the gameplay.
Only in the EDITOR
Thanks

ok then what I offered should work. I am not sure what you are trying to do that is not working.
The construction script can handle it.

Are you trying to individually modify each square? or create large groups that are the same?

I see what ivanesses means, it’s more or less the same thing I’m trying to do. For example I’m trying to create a lot of actors (hundreds) in a ring formation by using a different blueprint which I called TestBuilder. The instances could be generated after event begin play, but of course it would be nice to see them in the editor how they would look before running the level, because they could be in the wrong place, so setting the parameters on the builder, and instantly seeing the changes would be nice (and it makes more sense to spawn them in the editor since the number I want to spawn won’t change when the game starts running). Also, if I had to edit only a few of the hundreds of actors, like grabbing a few, and translating them, it would help a lot, if there was a way to spawn actors from construction script.

I’m currently thinking about the workaround that I do the instantiation manually in the editor (that should be easy, duplicating all the actors until there’s enough), and the repositioning them the way I want. Automation would be great though

I found a function called Spawn, which can be called on a Viewport, but I can’t get a reference to the viewport

For me it works kinda hacky but it WORKS (only on UE4.15 and above as far as I know tho). Enable “Editor Utility Blueprints” under experimental in your Engine Prefereces and restart editor. Make a Custom Event in the blueprint that you want to spawn from; click on the event and in the Details check Call in Editor. Now, you can’t feed the event input variables, those won’t show up; but it can get information from exposed variables. That event will show up in editor on an instanced blueprint on the bottom of the details panel as a button, neat. (as of 4.17 it is sorted by assigned category, also neat, I can group the button with its relevant variables)

Great answer DoctorD!