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"

Everybody but owning client sees movement

I made a new minimal project solely to demonstrate my issue. I'm having a client tell the server to move the client if a button is pressed. The thing is that the client who presses the key does not see the movement, but all the other clients (non-owning clients) can see this movement. Here's an image to illustrate:

alt text

This is all the blueprint code for the player (The player blueprint is derived from the Pawn class and contains nothing but a static mesh and a camera):

Oh and I should mention that the "ServerMove" event is in fact a "RELIABLE Run On Server" event, the event node doesn't update properly to display this. But as you can see when the event is called the proper information displays. alt text

And this is the startup logic in the Gamemode blueprint (this blueprint also sets the Player blueprint as "Default Pawn"):

alt text

Product Version: Not Selected
Tags:
more ▼

asked Jan 31 '15 at 11:55 AM in Blueprint Scripting

avatar image

Symphonym
5 4 4 7

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

1 answer: sort voted first

So I solved the problem by adding a multicast after the run on server event, but it still kind of confuses me. Here's what I did:

alt text

First off I don't understand why the other clients moved without the multicast, seems to me that only the server should be aware of the movement in that case.

And second, in the UE4 tutorial video where he uses the "Run On Server" event he doesn't use an extra multicast event to broadcast what was executed on the server. Or perhaps that's because he's running one client and one listen server, if another client were to join then that solution might not work? Video in question: https://www.youtube.com/watch?v=htdI2dh-aek∈dex=92&list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE#t=26m59s

ue4inputbp3.png (186.3 kB)
more ▼

answered Jan 31 '15 at 12:37 PM

avatar image

Symphonym
5 4 4 7

(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