Character spline path branch

I’m currently working on Side scrolling game project and i have made character locked in to spline path.
Followed this tutorial

and it worked but i need branch character path to other spline after he hits the trigger. After few attempts to come up with this i give up. No ideas.
Any suggestions are welcome!
Thank you.

Could you upload a screenshot of your blueprint setup where you try to switch splines? It might help us to see what your problem is.

I added second variable “Char_spline_2” wich reffereced to another spline through branch node. I know this not going to work that was just an idea…

Uhm, I don’t see any logic problems directly in you Blueprints…

Make sure you set the Char_Spline_2 in the details of your character located in your level, the Char_Spline_2 might be connected to nothing or to the wrong spline.

What you could do to make it more readable is:

  • Add an extra Char_Spline variable and call it Char_Spline_Var
  • Delete the branch in the beginning of your event Tick and connect your tick directly to the top SetActorLocation node
  • Change every Char_Spline into our new Variable Spline(Char_Spline_Var) in this BP line
  • Disconnect the Press B button
  • change the on pressed to set our variable: Char_Spline_Var to Char_Spline
  • change the on released to set our variable: Char_Spline_Var to Char_Spline_2

Now you completely eliminated the extra branch that has the same blueprint code and changed into a “Variable” one

Hope this helps,

Elias

Thank you! I thought you forgot.
I’ll try and replay results.

Char_Spline_Var must be referenced to Char_Spline Bp or Char_Spline_2 Bp? Or it must be Float?

It must be the same type as Char_Spline, so it would be like a SplineActor?

Char_spline variable is referenced to Char_spline Bp so it knows start world location of spline bp.Same thing with Char_spline_2.
Char_spline_var variable can’t be same type of variable.

Both spline actors should be from the same blueprint :slight_smile: No need to create a new blueprint class since they should both have the same functionality.

If you make a copy of your first one and get the world location from the copy it will be the correct position, if I get home I can explain this a bit more if you need :slight_smile:

No i understand.please show me that—
change the on pressed to set our variable: Char_Spline_Var to Char_Spline

change the on released to set our variable: Char_Spline_Var to Char_Spline_2
Thank you!

Drag the variable onto the grid and select the “set” and then plug in the Char_Spline and in the other one plug in Char_Spline_2.

So this what i did and it’s not working.

I deleted second spline bp and just dragged first one into the scene to create some second spline.
I selected Char_spline2 in the details of the character.Char_spline_var (no tooltip referecend Bp but the same type) leave as none. Other way it’s pointless because it is setting position on first spline and only.But in this case Char_spline_var not determinating world position and this what we get

Here whole setup

May be we could do something that works in online?I would appreciated a lot!!!