Collision from BP A removes ISMs from Forloop construction script in BP B

I have a BP that makes floors for a building using ISMs nested in forloops for (Floor, X direction and Y direction), in a construction script. I have separate BP of Stairs that has a collision box. I need to be able to move the Stairs BP around on the floors and have the “Floor Squares” skipped where the collision is in the editor.


This is for a procedural building and the designer needs to be able to move the stairs around and have the floor squares not out. Here is an image to show an example.

I was thinking about this a bit more… :slight_smile:

You have to do it within one BP, basically. Otherwise the construction script doesn’t run.

You can certainly give the ‘feeling’ of it being different blueprints, but you need a central BP orchestrating everything, otherwise it won’t work.

Things like

look like they do this in construction, but it’s a plugin.

I would love to hear from someone else, if there’s another way of doing it :slight_smile:

@ClockworkOcean Thanks I have this plugin but I want to sell this in the Marketplace and can’t relie on Plugins. I don’t even know where to start on this, though if I can’t find a solution I’ll go back to the solution you showed me.

I think it’s possible to make it feel like separate things, but it would really be one central BP.

I will have a go later, but can’t right now…

Floor bp

Stair

In world


In my case I would have to add in a length offset of the stair bounding box due to the pivot point of the stairs.

It works but has 1 fatal flaw. Even though the stairs are separate bp’s to the floors it only evaluates on a fresh compile of the floor bp (probably due to get all actors of class of the stair bp)

Perhaps a child actor of the stairs inside of the floor would evaluate in parallel but it is rather uncomfortable to use.

You can also do it with the method I thought of earlier, where you basically put the whole construction script in an editor callable event. It turns out, you can also use blueprint interfaces during construction, so you can keep everything independent.

I got as far as remove instance, but ran out of steam before I could get it to regenerate the missing boxes ( the 3 cubes are tiles :slight_smile: and the collision box is stairs )

construct

So the construction script in both is

image

The BPI is

The ‘tiles’ BP

and the ‘stairs’

In a word, nightmare. Which is why Code Respawn did it as a plugin :slight_smile:

@3dRaven Wow, even if the user has to recompile this is far easier than the array of struts way of doing it. I have to look it over and see if I understand it all but this great. Thank you so much, I can’t wait to try it. :grinning:

@ClockworkOcean This is great too, This is nice because I have elevator shaft and I could just extend one collision box though all the floors. Just have to find away to bring them back. Thanks :grinning:

1 Like

Bringing them back is just re-running the construction, but at the right time.

@3dRaven I have maybe a stupid Question I use GetAllActorsOfClass to get the stairs BP but how to I target the collision box in the BP? Thanks


You should have access to “CollisionBox” in the case of your blueprint. Just pull off the pin in the for loop (it should be an instance of BP_Stairs)

@3dRaven yeah got that part but why can’t I get the box extent?

Your for loop is missing the array it’s iterating (you have an empty array symbol)

Still can’t get it

@3dRaven

You need to iterate the array called “Colliders” that gathered the boxcollider in the earlier pre-pass
Colliders is an array made up of objects of type “BoxCollision”

@3dRaven I don’t get what you mean


?


@3dRaven Dude,
I’m really sorry, I must be stupid I just don’t see any difference in what I’m doing?


If you can’t extract the extent from the for loop then maybe it’s a an unreal bug. Try making a new for loop from the boxcollider array and pulling out an extent from the iteration.

For loops usually break when you fiddle with the variable :frowning: Perhaps a fresh one will fix things.

Unreal can sometimes drive you up the wall with small bugs. Sometimes it’s good to take a short break every now and again.