Hello, I’m trying to play an animation in widget blueprint, but only when a variable from player BP is equal to 2. It does compile, but does not work.
Here’s blueprint:
Accessed None usually means an object (actor, widget, etc) reference variable doesn’t point to anything or points to an invalid object.
"Accessed None trying to read property As BP First Person Character"
This means your As BP First Person Character variable (in your screenshot) doesn’t point to a valid object. Given the name of the variable, I’m assuming this is supposed to be pointing to a Character pawn that you made. Make sure that when your logic is called (so in this case when X is pressed), your As BP First Person Character variable has been properly set up.
It is always safer to use a IsValid macro when you have references to objects that may be invalid during play.
Just like @kaiagan1 said, your reference is not valid. If you would be kind enough to show how you’re setting up said reference, we might be able to point out a fix right away.
Right now you are trying to read value of “Position” int variable inside your First Person Character but engine doesn’t know where to look because you reference doesn’t point to anything (is null or empty if you will).