Timeline stopping

In my map, there is a path, with a blueprint I managed to spawn objects that follow that path, the problem is, I want to spawn more objects that move in the same time in the path, but when I send a new object the one before that stops.(spline path)

So when I press start it sends first object, but when i press it again, when the first object still moving, it stops the first one, and the new one is moving only. I want to make them move in the same time.

It might be a better idea to have each object be an actor blueprint and have the movement logic be in this bp instead of in whatever bp is doing the spawning. They’ll each start running their own instance of the code whenever they spawn and you shouldnt run into any issues with your timelines.

This will obviously make finding your spline a bit harder in each of those instanced object (I’m guessing you’re using level bp right now), but you should be able to grab that spline from the level if you use a “get all actor with tag” node, as long as you give your spline a unique tag and then hooking up the array it gives you to a “for each loop”

, which will only run once if no other actor have the tag you specified in your search.

The objects that spawning are all the same, they are like spheres, so for example if i want to spawn 10-20 objects i have to make 10-20 actor blueprints too?

And I don’t really understand how your blueprint spawns the actors, I dont have any spheres on the map so I have to spawn them each time i want to send in the path

This is the object/actor i want to spawn

213589-screenshot-2.jpg

ah sorry, I guess I wasnt clear enough!

The way you spawn the sphere is just fine, you should keep that, but the part where you tell them to move would be better if placed into a different bp (the sphere’s bp instead of the level bp. that way each sphere will automatically have its instance of the timeline you made up and running without it resetting everytime!)

Sphere spawning. feel free to spawn them at the point you had set up in yours, using the spline position is just what I did to test mine

This is the piece of bp I was showing you before, in the sphere actor you are spawning (physichsbox for you). It first gets any spline actor you have in the scene (get all actor of class) then set this as the spline the actor should be following. You can tehn have the same movement logic you had before right there! Alternativelly, you can find your spline actor with a tag if you have more than one of them and then use a cast to tell unreal what it is if you have more than 1 instance of your spline actor in the level(top line of bp).

I hopes this cleared up some stuff for you :wink:

HI, I tried to make it just like you did, but in the physichsbox blueprint I cant place my spline ( that is an other blueprint ),I tried to make add a new spline into the physichsbox blueprint, (but im not sure if its the same spline, like I made the path before) so I could get those “target - spline” and “set - spline component” nodes, but I still couldn’t connect it to the ForEachLoopNode, I dont really understand that in yours, is it a new spline or somehow you refered to the original spline with path. Sorry for being this bad in this, this is my first “game”. Here are my blueprints now.

As you can see, I could put the spline component in the level blueprint.

This is the physichsbox blueprint, and in this i just created a new spline, because I couldnt put the original spline blueprint in it, but still i can’t connect the foreachloop with the target-spline one.

And this is the spline “blueprint” I made the path with this one, on the map, and this is the one I can’t put into the physichsbox blueprint.

Also, if I try to copy paste this from the level blueprint

into the physichsbox, this happens, it goes to unknown

213888-screenshot-7.jpg

you’re on the right track!

You need to connect either the top line of the code (get actor with tag) to your event so it will fire through (right now it doesnt do anything, and also has no tag specified; if you want to use that one, you’ll have to give a tag to your spline thing in the level)
or
you need to set that spline variable after the second for each loop. Right now its going through just fine, buuut nothing is telling your variable what spine its supposed to be.

Basically the first part (before the loop is completed and you go on to move your spheres) is for unreal to find your spline blueprint in the level since it cant know where it is by itself, unlike in the level bp. The pin that comes out of the for each loop node (array element) will be each instance of spline you have in the level (hence why I also gave you the other option, it will get confused if theres more than one of the spline blueprint). so, you will need to use this pin either directly as a reference to the spline bp (unreal now knows its an instance of spline!), get the spline componenet of of it (taget-spline) and either set it in a variable (what I did) or use it directly anywhere you need to get a reference for that spline.

The spline reference from the level bp is not working because you could be using your other bluprints in absolutelly any other level, so unreal can’t know if the object you are trying to reference even exist, which is why you have to take some extra steps to find it some other way (yeah, its anoying, but you’ll get used to it ;))

Recapitulating what the blueprint is supposed to do:

-as soon as the sphere starts existing, send a pulse through to so everything connected in order (begin play)

-look through the level and fin all instance of the spline bp an put them in an array (for each loop)

-on each thing in this array, set get the spline component that’s inside and set it as a variable (the bit you didnt conect)

-once it has done everything in the loop, play the timeline

-set position of the sphere (by getting a point along the spline that corresponds to your timeline value multiplied by some stuff. This should work if you set your spline variable or if you use the spline from the loop directly, but it is not doing anything right now because the variable is “empty”)

I’ll try it now, I hope I can make it

Where are these from?

I still couldn’t connect those , also i dont find the Spline Component node

Oh, man finally i could make it, thank you for your patience and help!!!