In Paper 2D I am running a routine to move my player character during some animations - this is so the player is roughly where the animation shows them to be at all times. The first two animations that run through it work as expected, but on the third animation it goes wrong. After some debugging I’ve discovered it literally executes some nodes out of order - which I thought was impossible.
Here’s the BP code:
So the first and second time this Custom Event is called it executes the nodes numbered 1 to 10 without a problem.
The third time it performs 1, 2 and then jumps to the timeline (6), and then executes 7 to 10, THEN magically jumps back and does 3 and 4.
I have checked lots of things, things like:
The custom event is NOT being called again during the third execution.
If I rearrange the order of the nodes then it still misses nodes, it seems to be the ones just before the timelines. So if I change 4 and 5 to be 2 and 3, it will perform those correctly but the ones that are now 4 and 5 will be skipped until after 6 to 10.
Delays added and removed all over the place. I still get the same results.
If someone could shed some light on how this could possibly occur I’d appreciate it as I am stuck as to how to solve this one…
Thanks UGMOE!!!
Sorry for the delayed reply!
Ugmoe you hit upon the issue. I think there’s a bug in the Timeline code somewhere.
I tried not setting the timeline length (via node 2) and setting it within the timeline. Doing so did fix the problem! The nodes all fired in the right order! Thank you!
My issue is that only one of the three anims I’m currently using this routine for are of the same length… but that’s fine.
So I am now assuming there’s a bug in the timeline code, issues can occur if you set the timeline length outside of the timeline itself. So I shall adapt my routine and have to add a timeline for every animation. That’s okay for the moment.
It’s quite scary when you see the debugger jump nodes in an impossible order!
I think you have to convert your comment into an answer for me to be able to mark it as a solution. I can’t seem to see a way of marking your response as the answer.