Download

Casting problem

cast5.jpg
I switched the functionality of my weapons to a new base weapon class, previously all of the logic was in the character blueprint. However I am getting problems with the cast.

cast7.jpg

Got a bit farther, however I am getting runtime errors now.

97fbf96273d3eda9c5716dabb944c9198067286f.jpeg

This is where the equippedweapon reference is set after creating an actor. The reference works on all animation tasks, the inputs are reacting to it, but the animation blueprint in its event graph shows runtime errors.

Added some valid checks, and it appears because the weapon is not existing for a small amount of time at start, the anim blue print does not read from the weapon. Or I made a mistake in referencing the spawned weapon. But that is not the case because calling functions and animations outside of the anim bp work. And the anim bp itself does run, I checked it at runtime. However the variables in its event graph, which read from the currently used weapon never update.

It used to work when casting from the player character and its variables