I actually noticed my method I described above is kinfof random. It sometimes works and sometimes doesn’t and I have to try to PIE multiple times while running the sequence manually before it somehow occasionally binds the level blueprint to the right parameter.
And that’s every time I add a new keyframe where I call the event. It’s not the event track itself that binds to the level blueprint. I’m now looking for an even more reliable way to call the level blueprint.
I also found more evidence that this should be easier. The level blueprint has a way of binding to a specific actor that is repsonsible for playing the level blueprint in the level in the first place.
This is if I enable a PIE session
This is in editor only if I click the same button:
Somehow I eventually manage to make it so the technique I described above has the event track properly link up to the level blueprint so even when I’m not in PIE mode and editing my animation in sequencer, I can drag the playhead forward and trigger the scripts to play. There’s an options for a track to run when played in reverse but dragging the playhead backwards in the editor doesn’t trigger that.
I’m considering a different method where I don’t use level blueprints at all for what I’m doing due to how flaky this is. First of all, If I was working on a cutscene for my game I’d expect to be able to run level blueprints easily from the sequence editor of all things. Second of all, I’m mostly doing this to create animations for my character reloading a gun using the new control rig feature so I can stop using ART in maya because support for that has died long ago. I have a few basic scripts that when things work, it properly makes my characer show/hide the gun he’s supposed to hold during animations, and the magazine he’s reloading. It all works when things do work, but to get it to work is really finnicky and random.
Here’s a video of it somehow working but I’m never sure how to make it work and it just randomly starts to work. The magazine is able to attach itself to the gun and the character’s hand, and hide itself whenver triggered because the script keyframes managed to bind the level bluprint as the target. Not sure what I did to make this work, but somehow the parameter passed to the blueprint scripts in the sequence director blueprint happen to be a reference to the level blueprint. (Also please keep in mind this animation is about 50% complete and is in no way a reflection of my ability to make a weapon reloading animation.)
And here’s a video of it not working. I’ve tried what I tried before but the paramter to the script being the bound object is somehow “None” instead of the level blueprint, so it’s not running the attach magazine script. And if you pay attention to my mouse cursor, I’m hilghligthing the magazine not being where it should be on the gun due to the bound parameter being “None” instead of the level blueprint. (Here I’m taking an animation I previously made in Maya and the ART tool running on the UE4 Mannequin and recreating it in Unreal’s tools on the UE5 mannequin. It’s almost like tracing/rotoscoping. Retargetting didn’t work due to a new skeleton structure I’m experimenting with.)
Also maybe I’ll try the blast plugin instead. And if anyone is interested in how I even managed to do what I did I can put out a youtube tutorial for that too. Doing this in Unreal is very challenging in 5.0.2 but it took some clever tricks. Might be easier in later versions of Unreal when they fix a lot of things in regards to space switching and other such things. It definitely required modifying the control rig and creating a lot of custom control rig controls that don’t come with metahuman or lyra or the 3rd person template.
If unreal allowed space switching with objects not in the control rig itself, this kind of animation would be trivial to make.