Casting in Multiplayer
Hello. Im trying to make a multiplayer game. I'm using the "Third person character tempate" I'm wondering how I would cast to a seccond client.
Im wanting to get information stored in variables from the second player. for example I'm wanting to get its name as a test. If I set the name of player 2 to "Test Character" and player 1 to "Server character" when I click on the second player the hit resut casts to whichever player clicked so it prints the wrong name. printing "Server character" and not "Test character"
Im still entirely new to Multiplayer Settings as this is my first attempt so if I'm doing somthing entirely wrong here apologies.
Thanks very much in advance for any help.
From the EventActorOnClicked, I assume this code is inside the character that is getting clicked? This + get player controller wont work together. The Player controller is not replicated, so there's going to be a mismatch in data.
Instead if you put this code inside your character that you control, your getting your own player controller, and run the event on mouse click or however local event you like. So your using your player controller to get the mouse position and tracing to the other character.
answered Aug 26 '17 at 03:50 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here