UE4 Blueprints Multiplayer Get Variable From Same Class Not Working

MarsMiner
Thu, 26 Apr 2018 16:38:36 +0000
Multiplayer & Networking

Hi all,

I am working on a blueprints multiplayer game and am having some difficulties. I need to be able to access some values about ALL the players. What I am currently doing is (in the character blueprint) doing get all actors of class MyCharacter, then getting a variable from each of them. However, when I do this it just gives me the value of the variable within the player I am running the code in’s variable. Let me explain with an example - One player has an ID variable with value 100. The other has value 200. When I run the code from player 1, it thinks that both players ID is set to 100. When I run the code from player 2, it thinks that both players ID is set to 200. As a test, I made it get the players location instead. This time, it returned different locations for each player.

Can anyone help with this?

Thanks!

EDIT: This doesn’t just happen when I do this in my player character. If I put the same code in the Game Instance, or Game Mode, I still get the same strange result.

5 posts - 1 participant