How can i control an actor in a Networked game ?
I am kinda new to networking system and apparently i have bumped into a problem while creating a simple multiplayer game.
Okay here is what i have :-
I have set up number of players to 2, created a pawn called it player. (set to Replicated and most of the blueprint coding resides in the pawn BP, also default pawn class is set to player in game mode), placed 2 actors in the world, Gun A and Gun B (these actors are basically guns that shot)
What i want to do is 1) when i press the button F in Client 1 window, i want Client 1 to Shot Gun A and this should be seen by Client 2 2) When i press the button F in Client 2 window, i want client 2 to shot Gun B and this should be seen by Client 1
Okay here is the problem that i am facing.
The problem is that bot the client are accessing the same Gun or the same Actor ie: When i Press the button F in the client 1 window, The client 1 access Gun A and shots it, and this is seen by Client 2 which is exactly what i want now When i Press the Button F in the Client 2 Window, The client 2 also access Gun A and shots it Where as i want the client 2 to access Gun B and shot it.
Can anyone please help me out in this by letting me know how i could make Client 2 access Gun B ?
asked Apr 12 '16 at 12:34 PM in Blueprint Scripting
a direct answer on this would need to be the complete code for your Gun issue. That's a bit much too ask.
So instead of coding you your solution, I can guide you to resources that might help you understanding networking a bit better.
In the Learn Tab of the Launcher, you can find the Game called Multiplayer Shootout. You might need to scroll down a bit to find it.
You can also download my own Blueprint Network example, but that does not have shooting weapons in it. That's more for learning how to manage GameStates and spawning Players one after another, waiting for everyone to connect etc. I will still link it (:
You need to scroll down a bit. The Project is called Ball Bump. It's below the last Youtube Video in my first post:
If you still run into problems with your Replication, then please post a few pictures of your Blueprints. That makes it way easier to see what is going on and what your mistake might be (:
Follow this question
Once you sign in you will be able to subscribe for any updates here