Get distance between an object and player1 , player 2

HI

I need a simple way to get a distance between an object in the level and the player1(server player ) and distance between the same object and the player2(client). so i can compare how much far is the distance between the this object and the 2 player , i know how to make a line trace but i 'm totally noob in multiplayer and i already watched the series of epic tutorial in youtube so anyone can draw me a simple blueprint pls ? i tryied to use player controller 0 and 1 and player pawn 0 and 1 but that didn’t work .

thanks.

You want to display all comparisons simultaneously all each screens or just each client’s own comparison?

just simple comparisons with 2 player from 1 source . if you get what i mean , let me make it more clear i 'm trying to let the enemy ai attack the player who is closer to him in a multiplayer game that i 'm working on now , the 1st player character is the server itself and the 2nd player character is the 1st client and thats it only 2 player , but i have very low knowledge in mp and the tutorials about mp is very few .

This is easy. If the AI are placed in the level, for all intents and purposes this AI will be on the server. If you have a reference to the players, loop through them and get the one closest to the AI. This is how I did it.

Thank you guys for your nice support it worked the way i want , i have another prob in case you guys have any idea hope to tell me as i spent the whole day searching for an answer tat i couldn’t find and i don’t like to open another thread for it ,

The problem is with character mesh rotation replication , i 'm working on the 3d side scrolling project i tried in both 4.10 and 4.9 and i get same problem which is if i make a new character class no matter how do i replicate the rotation it just doesn’t get replicate to the client . have anyone faced such problem ? it works fine with any static mesh only the problem is with character mesh .

i found a solution for my rotation skeleton mesh problem in case someone was looking for the same answer , seems somehow its not easy to replicate the sk mesh rotation so i tried to replicate the controller rotation which needed some tweak in my BP and it worked now .