Anim Montage won't play

I’ve been stuck for months on an issue with certain characters whose montages won’t play in game. It works fine in the preview and the editor but not on play back. The animations and montages were retargeted from OG characters (who are working,) and the settings are all the same between working and non working. The nodes even fire and the montages are called to the nodes at breakpoint. If I change the Blend In to 0, it just runs for a microsecond into the first frame then fails. Major headache since this has been happening for all of my newly created characters.




You need to look at the log.
The log will have reasons/warnings/errors of some sort.

If the skeleton was bad you’d see a TPose.

There was a report of some blend nodes not working - you could be running into that but it would be pretty easy to check/wouldnt work anywhere.

Your slots could be off/not set on the retargeted skeletons.
To whitch youd get errors in the log…

There are no errors listed. Slots are all default. Another weird thing on some, they will work if approached from behind as long as the NPC don’t turn around. I never set any contingencies based on direction. Just a head scratcher.

Can you try doing this:

Get rid of the UPPER_BODY slot, and only use the default slot.

I have already done that. I have the state machine flowing directly into the default slot.

Sound like an OoP error: order of operations.

Something like the aim offset is overriding the montage slot.

Yes the log wouldn’t help in that case.

You need to review the whole state machine system or start it from scratch
(Which if now you have more experience may be a good thing anyway?)

1 Like

I just rebuilt the state machine. I also (for testing) plugged the blend spaces directly into the Slot and Output. But same problem exists.

Unplug everything and try just the montage, work up from there… if it works…

I moved the montage to BeginPlay for testing. Montage played right away. I move it back and it’s doing the same thing (not working.)

So then its something in your code that is overriding it?
I still think it’s an order of operations issue in the abp.
Remove ebrtything but the slot, and test…
If the code works wherever its at the issue is the abp not the code.

1 Like

I did that, and I even created a dummy ABP with only the slot connected. Same result, some montages (BT Tasks) work but that’s it. I even removed the BT and controller, no dice.

OK, then what are you doing in code that is overriding the montage?

Has to be something specific like triggering a different montage, or causing all montages to stop.

If you removed everything except the slot node, you have no underlying animations at all, so there’s nothing appening at the animation level except for montages.

Meaning the issue cannot be code rotating or moving the character or any gameplay thing that doesn’t spwcifically deal with montages.

Not necessarily related to the same slot though if its a rogue stop montage node.

There are two stop montage nodes in use. One is when damage is taken (the picture below.) The other is in the BT task, to cancel any actions on being hit.

This is not an issue on most of my NPCs, just certain ones. They all have the same parent (which is working as well.)

I removed both stops, hit Play, but nothing really changed.

Maybe a play montage that’s overriding then?

I am still trying to figure out why it works for my older characters? They all have the same parent BP (and originally some shared skeletons) where most of the code is, but some work while the later ones do not. I set their skeleton up uniformly (plus sockets for weapon wielders.) I re-organized some of the code yesterday to make it more efficient but STILL have the same problem.

Could you have messed with either the skeletal hierarchy, the skeletal settings, or the actual weight paint?
But then in that case nothing should work…

Pretty much out of ideas.

No, everything was based off of the mannequin. Only adjustments were adding sockets. This is so strange.

Could be some sort of general setting, like root motion for instance.
Or on the character.
Orient rotation to camera or similar…

In my experience its easier to start from 0 and build up a good base rather than track down a random thing you don’t even know has adverse effects…
Takes longer but gets you a final result, vs taking forever and possibly coming up empty…

I just rebuilt one of my affected character BPs. It seems to work when they are not armed. The problem comes back when they draw their weapons. I had the controller ignore the Draw Weapon node and everything animated as planned. I set the weapons to no collision. I think it may something with either their weapons or their armed stance (ABP.)

I pinpointed the problem to the montage where the character draws his weapon. By bypassing that PlayAnimMontage, all the other montages now function. Now the question is why the Draw Weapon causes other montages not to play, but the show can go on without it.