I have an apple that the player collides with in the scene to create a level sequence. In the level sequence’ events graph, I have a track event that happens when the time hits a keyframe to run the event. This sequence event call functions back to the apple blueprint and tells the level sequence to pause. There is some dialogue using widgets and stuff, then when the player finishes going through the dialogue, the level sequence is told to play again. So, I’m just trying to create cutscenes with onscreen dialogue, and the best way to do this is by pausing and playing so the sequence doesn’t end until the player is done going through the dialogue. Pretty simple, right?
Well, here’s the problem. Whenever I first run PIE to play the game, the pause node works just fine. But if I exit out not long after it pauses and then run PIE again right away and create the sequence again, the pause node no longer works because it says “Accessed none”. But if I stop PIE and wait long enough, then go back in, pause works again. This appears to be an editor issue since the result seems determined by how long I wait before playing the game again. So, keep that in mind as I continue explaining.
I tried figuring out if it was still playing the moment it tries to pause it (as an attempt to debug), so I used print strings attached to Is Playing and Is Paused nodes. Interestingly, whenever I’d give it more time and the pause node worked, it said “is playing”, “not paused”. But when it would screw up, it would say “not playing”, “not paused”. So, if it’s not playing and not paused, it must be invalid. It just feels like the level sequence reference gets lost or ruined somehow at some point for some reason.
So, I couldn’t figure out how to fix this, so I just tried ignoring the track event in the level sequence graph as my way of call functioning to the pause node in the apple blueprint, and instead just ran the pause node (again, in the apple blueprint) after a delay to allow the level sequence time to get to a certain point and then pause it. This actually worked no matter how fast or slow I was to jump back into PIE and play the game again. But then I ran into another problem, when the dialogue was over and it was time to finish playing the level sequence, I used a play node and it didn’t work. It said “Accessed none” again.
So, I decided to check if the level sequence is valid (this is my addition to the Is Playing and Is Paused nodes from earlier). So I used the Is Valid node with a print string and, it’s not valid the moment it tries to play again. But here’s the crazy part! I tried to see when it messes up so I made it check if valid every second and also continue to check it the moment it tries play it. Guess what happens! It says valid again and again and again as the dialogue continues and the level sequence is paused, but then when it tries to play it, it says not valid (when checking in the moment of the play node).
So, how can it be valid and not valid at the same time?
I’m just so confused and frustrated by this. This is one of the weirdest and most unpredictable issues I’ve ever seen in Unreal. Chatgpt can’t seem to help me either. It thinks it could be a garbage collection issue, but adjusting the seconds for that (from 61 to 5 seconds) didn’t help at all.
Does anyone know what’s wrong with Unreal’s unreliability to reference the level sequence?