So probably a little late to the party here, but i found very little information on how to get this working correctly. But i have managed to now have random pawns in the world become possessed by the sequence once it begins by doing the following:
- Add a pawn to the world of the same pawn type or subclass of the type you are spawning
- Create a new track with this pawn
- Add tags to this track (right click the track > Tags > Add tag name at the bottom
Now to bind the newly spawned Pawns, I do this in c++ so when i spawn my pawn through my own code i do this (Pawn is the newly spawned actor):
// Get the binding for the track tied to the "SpecialGuest" (we have set this track up and then deleted the possesable character from the sequence so we replace an empty track)
FMovieSceneObjectBindingID NewBindingID;
NewBindingID.SetGuid(LevelSequence->FindBindingByTag(TagSequenceSpecialGuest).GetGuid());
// Set the newly spawned Special Guest to use this binding
SpecialGuestStageSequence->SetBinding(NewBindingID, { Pawn });
// Play the sequence
LSPlayer->Play();
So this essentially gets the track to be bound to our newly spawned pawn via the tag and then we set our newly spawned pawn to be the bound to that track.
Now in your sequence you can call all sorts of things on this character via events etc
In mine i deleted the actor the track was bound to (they were possessable) hence the text is red in the image, this just meant i wouldn’t see this random pawn stood around. I did have some issue with deleting this pawn and found i needed to exit the editor restart it then find the pawn in the world outliner and delete from there, otherwise it seems to delete the track from the sequence if you delete the pawn any other way. You’ll know it’s not deleting the track from the sequence because when it works correctly you’ll get an unreal prompt saying you are deleting something that has references.
I imagine you might be able to use the spawnable setup on the pawn instead of posseable, but i tried this out in a packaged build and it all worked. It’s a little buggy on unreal 4.27 which is the version i am using.