Player Damage Not working

On the blueprints mars marine course, player damage not working on anim hit. Have followed previous posts solutions but to no avail.

The begin play for your AnimBP is not correct.

The way your code is set, it is trying to cast the contents of your Alien variable (which will have no object reference) into the same type it already is (see the “Note” in the Compiler Results). Not only will the cast fail, but any attempt to call functions from Alien later on will fail since it is not holding a reference to your Alien.

To fix this, we want to try and get the owner of the AnimBP with TryGetPawnOwner and then casting that result before setting the value of Alien.

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