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.
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
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 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
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