How can you call the players location in another blueprint?

We are trying to get a NPC to follow the player but we cannot figure out how to call the player’s location in the NPC’s blueprint.

We essentially need to know how to call one blueprint’s variable in another blueprint.

For a location you just need : Get Player Character 0 → Get Actor Location

For a specific variable I’m not sure, right now what comes up in my mind would be to use the level blueprint to get the variable from the player and then tell to the npc the value. There is probably a better way to do this with blueprints only.

Whenever I try this, Get Actor Location sets it’s Target to “self.”

You plugged the nodes correctly, right ?

nodes_location.jpg

If you are talking about the “target is self” under the node name it’s just a reference of the node location/context, not really what the node will execute. Did you tried anyway to see what was the result ?

Yes the nodes were plugged in correctly. It would seem the error was some where else and not in the Get Player Character & Get Actor Location.