How to determine what player owns what in multiplayer (Blueprint)

CJ31387
Mon, 23 Jun 2014 23:48:27 +0000
Multiplayer & Networking

I’ve done some multilayer games in Unity before, but I never could wrap my head around who was owning what and finding players through some action they did. Now that I am using Unreal I currently am making a 2d Multiplayer game But I have some questions

1: Each player will need to spawn with a gun actor that rotates and a mouse target box that is invisible but the gun actor looks toward it (I have this working with 1 player at the moment and it also shoots correctly). How would I go about making the gun actor and mouse target set to each player to only have them control it, and not have the other players use it. But I do want the other players to see each players gun rotating though, It is currently a pyramid mesh.

2: How do you know who’s who when creating blueprints for multiplayer? I need a better understanding on this. Say my blueprint spawns objects for the player when he loads the game, and another player also loads through those same blueprints, how do you determine who owns what objects or is it automatically done when they join? I would like to have a better understanding on how someone owns a spawned object.

3: What are ways of identifying players, say player 1 does something and player 7 does something how can I react in code to specifically what player 7 did.

Thanks in advance. Currently question 1 is top priority question 2 and 3 someone could fully explain later, but I want to make some progress with question 1 asap. Thanks

4 posts - 1 participant