Get Character Location in Level BP

Hello, I have two questions. I’m trying to get MYCharacters location from it’s class BP and use that value in my level BP. I’ve tried various methods like the ones featured the in BP communications and Interface tutorials to no avail. Those tutorials reference blueprints placed in the level, while I just want to get a variable. When I use a object variable to reference my characters blueprint and take the variable from there, it doesn’t load any values.

Secondly, I’m trying to use the “Get distance to” function in my level BP, to grab a distance between a target point and my characters location. Assuming I could get the character location info from my class BP, how can I plug that in to the “Get Distance to” function. Also I’m using the Third Person Template if that helps. I’ve been searching and watching videos on this subject for a couple of days now and I’m at my wits end.

How are you setting the MyCharVar? If you are just making it the Blueprint of your playercharacter it is looking at a blueprint but not the one that’s working in the game.

if single player you can just use Get PlayerIndex 0 then from that use the GetActorLocation or plug that directly into the OtherActor on the GetDistanceTo.

For a networked game you will have to do a little more work to access a specific player.

Thanks man, works great now!

@AcidRedux Don’t forget to mark this as the correct answer. This will help users with similar query.