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"

Playing with one Server and more than one Client, all clients above the first can´t move

Hi all,

so my real big Problem is that when i´m testing with more then 2 Players the second and third client (and above) are not moving (only the Player can´t move, the RTS cam works great), but i can rotate them. I´ve tested it in editor mode and in Standalone, its not working. And here comes the strange thing for me: When i´m testing in editor and try to debug, i select in the Player Blueprint one Client and then lookin at one of the Players for debugging, and then suddenly the first Client can´t move (still only the Player Character) and the other client can move run jump, whatever he wants. And after switching to another Player or client for debugging everyone can walk run jump and so on.

alt text Gamemode_Main: Handle Starting Players

alt text Function: Increase Player Count

alt text Gamemode_Main: Spawn Players and get the Reference to the owning PlayerController_Main

alt text Function: Spawn the Player and RTSCam

alt text PlayerController_Main: Getting the References of the Player and RTSCam

Sorry for the Big Question :D

Product Version: UE 4.14
Tags:
more ▼

asked Jan 21 '17 at 05:54 PM in Blueprint Scripting

avatar image

Mamouf
16 1 4 7

avatar image Mamouf Jan 21 '17 at 05:58 PM

Here are a few more pics, for better understanding.

alt text

PlayerController_Main: Switching the Pawn

alt text

PlayerController_Main: Switching the ViewTarget to Possessed Pawn

alt text

PlayerController_Main: details

alt text Player: Move

alt text Player: Rotate

avatar image Mamouf Jan 21 '17 at 06:00 PM

And the last Pic´s:

alt text

Player: Details

player details.png (51.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hmm. That's a lot of stuff. Are you aware that every client sees his own first player controller as player controller 0?

more ▼

answered Jan 21 '17 at 07:03 PM

avatar image

CleanCut
2.1k 67 84 77

avatar image Mamouf Jan 21 '17 at 09:14 PM

yes i am, but how can that help me with my problem?

avatar image CleanCut Jan 21 '17 at 11:39 PM

Just a sanity check. I don't know what's wrong with your project, but if you were instantiating clients as non-player-0, that definitely would have broken it.

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

Does Anyone know what the Problem is? I really can´t find the solution for this.

more ▼

answered Jan 24 '17 at 03:15 PM

avatar image

Mamouf
16 1 4 7

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

I found that the server always assigns remote players an index of -1, even if I explicitly set their index on the server to something else, it reverts them to -1, and the only players allowed to have a non negative-one index are the players that live on the server itself.

To get around this problem, I make any remote procedure calls that have to match a local playercontroller to its server equivalent (which are NOT the same object it turns out, because playercontrollers don't share across machines like pawns do), then I have to pass the PlayerState's Player Id variable into the RPC and loop through all the player controllers, fetching their playerstates' Player Ids and seeing if it matches. When I find the match then I tell it to do the action on THAT player controller.

So if you can avoid doing anything that has to match playercontrollers across machines, that's better than what I did, but I had to do it at least once after they join the server in order to match up the splitscreen players' preferences and assign them correctly. After that I don't have to mess with it very much.

more ▼

answered Mar 14 '18 at 05:44 AM

avatar image

mightyenigma
3.7k 18 23 20

(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