How to add a spline component to another blueprint from current blueprint?

I am trying to set up some blueprints to use for setting up train tracks for trains to travel on. I have one blueprint that reads a list of points from a data table to create one or several railroad track(s) (I will call this BP1), and a second blueprint that allows me to draw my own railroad track that is configured for train actors to move along it (Sean Dachtler’s Train Controller from the Marketplace if anyone is familiar - I will call this BP2).

If I want a train to switch between two tracks, I need two separate instances of the BP2 to reference from the level blueprint.

Basically, I would like my BP1 that reads the table of spline points to iteratively create a new instance of BP2 for each track in my table and add all the correct spline points to the Spline Component inside BP2 rather than hand-drawing the splines for each instance of BP2.

So, how do I create an instance of BP2 and modify the Spline Component inside BP2 from my other blueprint (BP1)?

Thanks in advance!

Hey there @mmckie360! Welcome to the community! So you can just instantiate your track class with an empty spline in it, then add the spline points from an array kind of like this:

1 Like

Thank you much! This worked :grin: