How can i use the level sequencer in a 2D game? I mean i did just like in a 3D game: add a level sequencer - Track - Add to sequencer - my platform but here i dont get the “Transform” section. Any help? I have also tried with “Timeline” and “SetRelativeLocation” but i dont know how to use “loop” so it can go from the final position to the initial position and so on.
Tell me what you’re trying to do and I’ll show you some code. I’ve found using BP much better than the sequencer to general animations because you have a lot more control.
I’ll post a simple moving cube here in a moment. It’s tempting to try it with a loop but timeline is they way…
I’m just trying to make a cube moving right <-> left or up <-> down.
Yup, so you can do it like I have below, using just an object placed in the level, using the level BP.
Or you can put the object in a BP and have the code in there also. It works slightly differently then. But basically you use SetRelativeLocation or SetActorLocation ( not relative ).
If you get stuck, gimme a few pics and a bit more info…
Can you show me your Timeline too please? And also, this is just up → down, how can i make it go down → up too? In my Timeline i ve selected the “loop” section but still doesnt work.
In my TL it’s just a line going from 0 - 1.
If you want to loop it and make it go up and down, you need to put 3 points, so the line goes from 0 to 1 and then back to 0 again.
( then click loop )
Can you show me how it should look like please?
Okay, and what else should i do to enable the loop functionality?
Click the loop box
I did this and still doesnt work :)).
Can you show me your BP?
Looks good. Did you set the mesh to movable ( in the details panel in the level )? Are you getting errors?
Yes, the platform is movable and no, i get 0 errors. The platform goes down and then stops.
Right. Delete the node that says ‘root component’. Drag the pin on the cube reference again and choose (static mesh component), and then connect that to the target.
Which one?
No, no. See my diagram below ( which was wrong and I changed it ). See how it goes cube → static mesh → target…
Okay i get it but how can i change it? :)).