Announcement

Collapse
No announcement yet.

[Re-upload] Client/Server can't see other clients and players animations and objects

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    As Chumble mentioned, for other players to see what you do, you need to replicate it first.
    The communication goes over the server, clients can't talk to each other directly, so they tell the server what they have to say and the server distributes the message to them.

    So if you want to spawn an object when doing X it looks something like this:
    Example

    I'd recommend reading these Wiki articles and watching a few tutorials, replication can be quite hard to understand in the beginning.
    https://www.youtube.com/watch?v=hDRoglljXjo
    https://docs.unrealengine.com/en-US/...1_1/index.html
    https://wiki.unrealengine.com/Replication
    Good luck

    Leave a comment:


  • replied
    Originally posted by Chumble View Post
    So, a client modifying a replicated value is meaningless. Replication only functions from the server to the client. If you want a client action to be replicated, you need to call a custom event set to "Run On Server". Then, modify your replicated values. And if you want something to be done on all clients, you need to call a second custom event with "Multicast".

    Often I will have setups that look like this

    Input Action Left Mouse > Call "s_left_click"
    "s_left_click" (run on server) > Call "mc_left_click"
    "mc_left_click" (multicast) > Play sound at location (x,y,z)

    This will need to be done for everything your player does that you want to be replicated BESIDES movement. UE4 has built in functionality to replicate movement (assuming you have it checked off).
    What about animations and objects? Actors/objects placed down by the client can't be seen by other clients, but I don't know how to fix that. And animations can't be seen by other clients, and I do not know what I've done wrong.

    Leave a comment:


  • replied
    So, a client modifying a replicated value is meaningless. Replication only functions from the server to the client. If you want a client action to be replicated, you need to call a custom event set to "Run On Server". Then, modify your replicated values. And if you want something to be done on all clients, you need to call a second custom event with "Multicast".

    Often I will have setups that look like this

    Input Action Left Mouse > Call "s_left_click"
    "s_left_click" (run on server) > Call "mc_left_click"
    "mc_left_click" (multicast) > Play sound at location (x,y,z)

    This will need to be done for everything your player does that you want to be replicated BESIDES movement. UE4 has built in functionality to replicate movement (assuming you have it checked off).

    Leave a comment:


  • [Re-upload] Client/Server can't see other clients and players animations and objects

    Hello. Sorry I'm reposting this, but I haven't got an answer for a while so I'm resubmitting it .
    I've converted/been converting my game from singleplayer to multiplayer and I've run into an issue since I'm not the best with multiplayer client/server responses. If the client is holding a weapon, the server or other client's can't see the animation of the weapon being held or the weapon itself in that player's hand. The same applies when the client dies (other clients and the server can't see the death animation of the client who died). When a client or the server build with the building mechanics I made, the other clients can't see it, but the person who built it can. All values are replicated, and I don't know why this is happening. All help is appreciated.
Working...
X