Announcement

Collapse
No announcement yet.

*MULTIPLAYER*Server can spawn actor, but client can't

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

    *MULTIPLAYER*Server can spawn actor, but client can't

    hello guys, i have a small problem , which is the following

    Click image for larger version

Name:	1.png
Views:	1
Size:	185.4 KB
ID:	1192288

    Click image for larger version

Name:	2.png
Views:	1
Size:	239.5 KB
ID:	1192290

    So i have this problem, when i press E on the SERVER, it spawns the actor in front of the cannon, and the server and the client can see it, but when i press E on the CLIENT, it spawns actor on client's screen but not on server's screen.
    what did i do wrong? what could be the problem? please answer me guys.

    Thanks
    Attached Files
    Zombie Physics Hit Reaction: https://forums.unrealengine.com/comm...-dismemberment

    Advanced RPG Combat Template:https://www.unrealengine.com/marketp...ombat-template

    #2
    What does the log window say (it should be listed under the developer tools in the "windows" part of the toolbar).
    Have you tried debugging/faultfinding? (placing break points on the nodes)
    Never say Never, Because Never comes too soon. - ryan20fun

    Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
    (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
    Good articles/Series: A trip through the Graphics Pipeline 2011

    Comment


      #3
      Canon... I think that canon is spawned at level start, and not in your character blueprint...
      You just go near cannon and want to shoot with E right?... Thats not possible because you dont own that canon because its spawned on server, and server owns "everything" but client owns only what is spawned in his blueprint...

      Check this: https://forums.unrealengine.com/show...hysics-network (you need work with player controller)
      Its my topic where i tried to control lifts, its same like you want to control canon i think...
      Last edited by Name368; 08-28-2016, 11:12 AM.

      Comment


        #4
        Perhaps the Fire event should be run on the server and the sfx should be replicated to the clients?

        WIP Thread

        Comment


          #5
          Who owns this actor?
          The client to server RPC will only work if the actor is owned by a player.
          Otherwise it is just lost to the nether... or something like that

          Its one of the reasons I use a special component for non-directly owned actors that routes input (such as 'E') through the player controller, to the server, then back to the server version of the same actor.
          Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

          Comment

          Working...
          X