"Event Begin Play" fires twice from default pawn class in multiplayer
Setting "Event Begin Play" to print "Hello" will result in Server: Hello, Server: Hello, Client1: Hello, Client1: Hello.
This is from a pawn blueprint I have set to be the default pawn in the game. Turning replication on/off doesn't change anything.
Question: Why does it do that? Is there a way to make it fire only once on each machine?
Bonus question: from the default Player Controller it will print twice on the Server and once on the Client. Why?
Self -> Is Locally Controlled -> Branch
answered Mar 20 '17 at 03:31 PM
try "get player pawn" with player number = 0. Branch on whether "self" equals player 0 ' pawn. Then print. This should work.
answered Jul 12 '16 at 12:44 AM
You are playing Multiplayer.
You have 2 Pawns. You have two Machines. Both Pawns execute their code on Both Machines.
This is why you get 4 Hello's.
You can use the "Switch Has Authority" Macro to execute Things on the Server/Clients only
answered Jun 13 '17 at 07:39 AM
This happens when Start players as Spectators is enabled in Game Mode
answered Jan 13 '19 at 02:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here