x

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"

The wrong player keeps respawning

In my game the character's death is triggered by entering the KillZVolume - Playing single player works fine, the character respawns as expected upon death - When playing multiplayer, if the second player dies it makes the first player respawn instead

I believe it has something to do with the way I'm passing information through the level blueprint. At the moment it casts to my MPGameMode blueprint - when player 1 dies this appears to work, but when player 2 dies, the cast fails.

Level Blueprint & MPGameMode blueprint: http://imgur.com/a/kxw7P

Any help would be greatly appreciated :) Thanks

Product Version: UE 4.10
Tags:
more ▼

asked Jan 31 '16 at 02:54 AM in Blueprint Scripting

avatar image

joshblaaa
58 3 1 5

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I think it's because PlayerController at zero index on server-side is server player. So try take instead 'other actor' pin from OnActorBeginOverlap event node.

more ▼

answered Jan 31 '16 at 10:42 AM

avatar image

alkohol
231 12 5 16

avatar image joshblaaa Jan 31 '16 at 11:08 AM

Thanks, I think you're onto something, I tried changing the numbers to '1' - this made only the second character respawn.

I couldn't work out a way to link together the playercontroller value with the 'other actor' pin. I guess what I really need is a way to get the ID of the player who fell in the killzone and pass that to the playercontroller field... Any ideas on that?

avatar image alkohol Jan 31 '16 at 11:22 AM

This would be helpful I hope.

I think here would be useful to read something about UE's client-server model and networking at all.

avatar image joshblaaa Jan 31 '16 at 11:43 AM

Ah, that clears it up as I was testing two players on one machine and therefore it couldn't really determine the current player... Thanks heaps!

(comments are locked)
10|2000 characters needed characters left
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