"Accessed None trying to read (real) property"

Hello to you all.

I’m making a sci-fi sports game that involves knocking a ball around with explosive hammers, but my issue lies in the fact that, for the past couple of months, I’ve been struggling to make a Blueprint that makes it so I catch the ball, and I can shoot the ball. Enclosed here are several screenshots with some descriptions of what they’re supposed to be.

This is the Blueprint I use for launching the ball. I have a Variable based on an actor I have out in the map.

This is the Ball in question, with Collision settings.

This is the Blueprint I use for my ball-catching logic. I have a volume on my player character that, when I hold right-click, it’s on stand-by to scoop up the ball.

This is the hammer I’m using, with a singular socket I’ve added where the Ball should snap to when I catch it.

And these are the errors I encounter when I test them all.

If anybody can give me a solution to this problem, I would very much appreciate it. Thank you in advance.

I’m assuming that first image is from BP_BoomhameerPlayer which is where all those referencing errors are happening.

The Ball reference is invalid, where are you doing that cast? The naming is slightly confusing (ball inside ball) I can’t tell if you are setting the reference before calling the reference or what but that is where your problem lies, everything that’s happening in that first image is applying logic to a null reference.

I’m not saying that this is how you should set it up but I have a feeling it will work if you do, just for testing run a GetActorOfClass Ball (I’m assuming there’s only one ball in play at a time) after the HoldingBall branch and connect the output of that to the Ball component. If that fixes your issues then you know it’s just the reference error.

…so I did what you said and added the Get Actor of Class to my launch Blueprint.

It works. I get a little thing that says “BP_BoomhammerBall.Ball Sphere has to have ‘Simulate Physics’ enabled if you’d like to AddImpulse.”

But it works.

Now I just feel like a complete idiot for overlooking something so simple, heh.