How do I make a spline local variable?

How do I make a local variable of a spline object? Whenever I try to add points in the blueprint, it returns the “accessed none trying to read property spline” error.

My goal is to find a point 100 units away from where the actor currently is in the right direction of a maze, but the only way I’ve found to do that is with Splines. If there’s a better way to do that, I would gladly take recommendations.

Currently, the only way I have found to do so is using Get Location at Distance Along Spline. The way I made the local variable is just promoting the Target to local variable.
image

Is there supposed to be something in the Spline Default Value? If so, what?
Thanks for any help you can provide!

Take the (hopefully valid) spline component reference var and assign its value to a local variable:

Promotion is the easiest. Or pass the spline ref into a function - they automagically create local refs.


Other than that, the intention is unclear.

I figured it out.
It may be because I was doing all of the spline stuff in the blueprint of the actor, but creating a Spline through promotion did not work. The answer was to add a Spline Component and use that. Since the whole purpose of the spline was to find a location a certain distance away an a path, I also needed to add a Destroy Component Node to reduce the memory usage.

You were trying to work with an object that did not even exist to start with…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.