Started digging into the Level Sequence Editor. This has been on my list of things to play with for a while, but I’d been getting so far with Timelines that I’d put it off.
I’ve mainly been trawling through the docs [and code] to get an understanding of what they can do, and I’m already excited. By the looks of things, I can tween any exposable parameter, from actor transforms down to Anim Instance blends (!), which is cool. What I needed to figure out today was how to start them (ie: trigger them through game play) and how to get them to bind to things that are dynamic in the world.
The docs suggest using the Level Blueprint to hold references, and have the sequences present in the map, but I don’t want to do that. Firstly, re-usable from the get-go seems more sensible to me. Secondly, I have enough shit in the map already. And lastly, my played character is dynamically spawned, so whatever I do I’m going to need to latch onto it...
Working backwards: if I put a player character BP in the world and then add a track for it in the Sequence, I can then delete the instance in the world and bind the spawned player character to that track at runtime. Seems to work a-ok; I just need something for the level sequence editor to be attached to while I’m editing it, otherwise it doesn't know the class of the actor / what's exposed.
Playing the sequence also seems to be pretty easy. I can create a player in any old BP, and pass a level sequence ref to it. I can even bind custom events to the player to track when the sequence ends, etc.
It doesn’t look like I can call arbitrary functions from a Level Sequence – only events already exposed from actors bound to tracks – which limits what they can do somewhat, but, there’s nothing stopping me routing calls to (say) the GameMode from “some other actor” in the sequence...
What do you mean, hack?
Still feeling my way around the level sequence editor.
Turns out that I was incorrect about it not being able to drop into arbitrary code. You can add an event track, with triggers, that falls straight into a blueprint. This means you can do pretty much anything you want! Wahey! That makes them VERY useful.
It’s been slow going today, but I’ve managed to get additive blending of settings on to the gameplay camera – I’m cheeky; I already use a CineCam as my gameplay camera, sssh – including position and focus. This required a few code changes, as it turns out my follow cam is never completely idle...
I’m able to control the player, spawn effects, and most importantly, control materials. I’ve made a bunch of new toys, like lines, radial pulses, donuts etc, that are all controllable through scalars, and hooked these up to some elements in the world to test with.
So far, my entrance sequence is all good, apart from the player. I need to stop the character controller from attempting to apply gravity, stop my animation blueprint from trying to work out if it’s falling, and add a gamewide “I’m in a ceremony, leave me alone” flag… (I’ve needed this for a while).
Getting my vaccine tomorrow, but the aim’s to make a good dent in all that before I ride off...
It would seem that I have at least three ways to lock the player. The very definition of something that’s grown arms and legs and now has a life of its own. There’s a way of doing it for identity ceremonies – what happens when you pick something up for the first time – a way the dungeon room controllers use, and now one for level sequences. This should really be tidied up, but...not today.
Locking for the level sequence turns off most of the animation checks, as well as the character motion controller, so it’s basically left a mesh in the world that the sequencer can do what it wants with. While I was in there, I added a delegate that broadcasts when the player’s locked. At the very least this should be added to the AI controllers, to pause NPCs, but that’s also a job for another day.
I got the player moving under sequenced control, and I added a dissolution particle effect (same as I used on the Skeletons, a couple of weeks back) to explode the mesh and fade into the transition to the Dungeon.
Annnd I got a vaccine...
Woke up at 6am and all my bones ache. Thought I might be jammy and get away with little to no side-effects from the jab, but I've basically been useless today.
But, I did an animation for the player character and added that to the sequence. Amazingly, it looks like my full-body animation slot has been broken forever, as the anim montage wasn’t firing. I assumed blend depth was the number of bones beyond root to blend, but it’s apparently something else. Or it’s just normalised? No idea, but flipping it to 1 (from 64) seemed to fix it... (Narrator voice: but it broke the upper body blends, so there's something still not right with this...)
The final transition sequence has come out pretty much as I hoped. I need to add facial expressions to the player character (that was on the list anyway), as they look a little too happy, but other than that… Yeah. Not bad.
Yeah, I know, it's been way too long since I did a dev log. Man, these things take all day :D