Cast to Blueprint is failing.

Hello,
I am currently working on a blue print to play various animations based on the damage type to determine the reaction animation that is played on an enemy AI.
I have hit a bit of a snag in that my Cast to BP keeps failing and I am not sure why, as the cast is working fine on my player character.
I have included a screenshot of the full graph, Calling on the DamageDIrectionMain BP with the variable connected to the enum.

I have tried everything I can think of and research and I do not understand why the cast will not work.

Hey @Zeryphim!

Try running a printstring after the eventAnyDamage, and plug the DamageType output into the printstring. Then when you run the game, it should give you the name- that’s one way of debugging.

I do notice your printstrings for the cast failure and the IsValid say the same thing- you’ll want to rename them so you can tell which is going off, since they both end the line you’ll never get it twice!

Let me know what that printstring returns and if it illuminates your issue at all! :slight_smile:

Yeah I made it the same but the colors they displayed as were different, which is what I was using to tell them apart.
I actually just found the issue a second ago. The children of the parent BP I was calling, I never actually set them when I wrote that piece two days prior. Once I did that. The Cast to stopped failing, and I was getting the alert from my isValid instead, which I was expecting.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.