Help with basic modular construction script

Hi All,

I’m trying my hand at modular construction scripts. I’ve tried looking at all available videos on youtube and tutorials on the forum, but I can’t find anything that tells me how to achieve exactly what I’m looking for (close, but it gets really confusing really fast). I only want to start basic, but even that is confusing me.

In short, all I want to do is have a wall as a static mesh, and have the ability to spawn one of two types of walls on either side…(wall left…<main static mesh>…wall right)…that kind of thing, but have it so I can have a couple of options for those walls as variations, and then, when the next wall section is in place, to repeat the same procedure on that so I can effectively array the wall meshes along like so… ‘static mesh starting point’>‘choose variable of next static mesh on left or right of original’>‘choose variable of static mesh on corresponding side of new mesh being either left or right (so if I spawn a mesh on the left, I can only choose what goes to the left of that mesh, whereas the right will be the previous mesh)’>‘repeat for newly spawned meshes on either side’…that kinda thing. I appreciate I might be terrible at explaining but I really am a little unfamiliar with the proper terminology.

Eventually I’d like to move onto more elaborate stuff all stemming from the basic mesh i.e. floor type below the wall, roof type above it etc, column type on end cap etc… but for now this is as much as I want to start with.

So far I have the construction script up, but beyond that I’m not sure on the right way to set a static mesh up. (Do I simply put in a ‘set static mesh’ or can I input the exact instance of the mesh which comes up as ‘add static mesh component’?)

I appreciate this might sound simple to some of you, but this is going right into the deep end for me, and nothing I’ve come across is able to explain modular construction like this in its purest, simplest form…

Thanks for your time. I really would appreciate any form of help…