Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Multiplayer Respawn Problem

Hello, I am having some problem with multiplayer respawning player on death. So I have a function in Game Mode takes care of the respawn, here; alt text

And in Game Player Controller I have another script called Respawn Request, which calls the function in the game mode. here; alt text

And, I call this function in the player controller, in the actual player when he is dead.

alt text

So the problem is, as you can see I binded X to respawn as well. For debugging. When I press X, server player and client respawning themselves which is totally fine. But when I shoot one with the other, the problem begins. If client shoots server, server gets respawned, which is what I want. But if server shoots client, server himself again gets respawned.

So I dont understand why X key is working fine on respawning but when I call it on damage it doesnt work fine. Thanks in advance.

Product Version: Not Selected
screenshot-1.png (510.8 kB)
screenshot-2.png (261.2 kB)
screenshot-3.png (557.6 kB)
screenshot-4.png (338.7 kB)
more ▼

asked Sep 28 '17 at 02:19 PM in Blueprint Scripting

avatar image

44 3 8 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Do not use GetPlayerController(0). Instead use alt text

more ▼

answered Sep 28 '17 at 04:05 PM

avatar image

326 2 6 13

avatar image HakanErunsal Sep 29 '17 at 07:41 AM

That solved the problem. Even if I put Get Player Controller instead of Self, it goes back to the same problem again. Get Controller and Self are working fine.

avatar image vorixo Oct 02 '17 at 12:21 AM

Could you please accept my reply as the answer cliking on the green icon? Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

From the pictures you posted, it seems the problem might be that your Respawn event in your PlayerController class is is a server only event. The server always has the PlayerIndex = 0, when you are a listen server. So when you are using your event only on server it always gets the server PlayerController. For a dedicated server it is similar. you are always getting the first player.

Hope this helps.

more ▼

answered Sep 28 '17 at 05:05 PM

avatar image

1 1 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question