Very new, how do I get one BP to change another BP's variable?

I’m trying to get an interaction with one item on the ground to change a variable in the player’s BP.

You would first would have to somehow get a reference of the gun to the player.

there are many ways to do this, but a very simple way is to implement an overlap event from either the gun or the player.

Then cast the overlapped AActor (the default actor class) to AGun.

This will allow us to modify the gun’s variables and call its functions and events.

Let’s implement it from the player’s side.

Here’s a step-by-step process of what’s happening here:

  1. We want the player to do something when it touches the gun, so we can implement EventActorBeginOverlap or OnComponentBeginOverlap (Your skeletal mesh for example). Both are valid ways to detect if the player touched or overlapped the gun.
  2. After we get the gun’s reference we then must Cast it to AGun

That’s all there is to it, Casting will be your best friend in Unreal Engine.