Blueprint Animation Casting Error

Good afternoon.

I’ve created an “iris” character and attached to it an animation blueprint called “Iris_ABP”. Since the “Iris” character has the information, I’m trying to get the owner pawn and cast it to an “Iris” actor with in the animation blueprint. Unfortunately, it fails on the cast. Am I going about this the wrong way, and if so what am I missing?

It seems ok. Dees it fail when you actually hit play or in preview?

Hey @dparham86!

Try replacing it with a “Cast To Character” and see if that fails as well. If it does fail, the setting of the ABP on the Iris BP is likely the culprit. If it doesn’t fail, we can ignore that possibility.

Check that and get back to us!

When I hit play it still fails. If I’m reading this incorrectly, do let me know.

I replaced it, and it failed casting it to character as well.

Okay. So let’s try using “Try Get Pawn Owner” with the return value going into a printstring (it will auto convert to string if you plug it into the string input) so it should return a name. See if it returns the name of Iris or NULL value.

This way we can make sure it’s actually getting a valid owner. The next thing to ask- is Iris’s parent “Character”?

It’s returning a null value, and yes Iris does inherit from Character. I was able to update the blueprint directly, though I don’t think this is the best way to approach it. The character does “die” when the value is updated from the Level Event Graph

Interesting. It shouldn’t be returning a null value. That would mean the ABP can’t find its owner, my first thought is that somehow the character is loading AFTER the ABP.

Try adding a 5 second delay after the initialize on the ABP. This is not a good permanent solution, but it’s a way to figure out the problem.

Also, try doing this in a basic level, not the Crumbling Faram Azula-looking place that decimates your video memory! :slight_smile: That could be part of the issue, causing certain threads to be slower.

Good morning. I added the delay before the Initialization and still fails at casting.

The output message is

“LogBlueprintUserMessages: [Iris_ABP_C_0] Failed”

Have you been doing this in a simple test level? Again, I’m worried that your VRAM is getting overburdened and causing issues here.

Also- Is this the only character you’ve made using a different skeletal mesh? That might be a thread to follow. Because when you set an ABP on a character’s skeletal mesh it should just… work. Because it shouldn’t ALLOW you to choose an ABP that doesn’t match the Skeletal mesh. But if you child it… You need to make sure it’s set correctly. Because the ABP is straight up saying it does not have an owner/the owner is incompatible- but it shouldn’t load in at all if it isn’t being called on.

Yes. I put it on a simple level and am still getting the same issue. The Iris character is a duplicate of the BP_ThirdPersonCharacter actor with other properties.

Hmm. What if you make a new character with 0 changes, and attach this ABP?

Also, what are these changes? Sorry, we’re going to have to get as much information as possible as this is pretty weird.

I was able to figure out what the issue was from your previous post. Apparently, I created a new actor of type “iris”, which I based off a BP ThirdPersonCharacter object and that was messing up setting the references for the animation blueprint. The solution was just to duplicate the ThirdPersonCharacter BP and renaming it.

Thanks for all of your assistance.

1 Like