Announcement

Collapse
No announcement yet.

Spawning and Possessing an Actor only works on server..

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

    Spawning and Possessing an Actor only works on server..

    So I'm trying to make a system where once you log in an actor is spawned and you possess it. I'm using the Action RPG Inventory system so it references a custom player character. It works in on the server but not on clients.

    I have created a loggedout pawn which is just a static camera and a login widget is added. Here is the code for when you press the login button (for now):

    Click image for larger version

Name:	loginguicode.PNG
Views:	146
Size:	77.0 KB
ID:	1686629And inside the inventory player controller is this code:

    Click image for larger version

Name:	inventoryplayercontrollercode.PNG
Views:	79
Size:	138.2 KB
ID:	1686630

    #2
    Maybe call a server function on the controller (from the button), and that function calls a function with the spawn actor node? This works for me... the Server_Respawn is called from a button on a Rip Screen Widget.

    Click image for larger version

Name:	1.jpg
Views:	80
Size:	154.1 KB
ID:	1686648Click image for larger version

Name:	2.jpg
Views:	168
Size:	163.7 KB
ID:	1686647
    [LEGENDS of EPICATwitter / FB / YT / Vimeo discord.gg/saG3x4Y]

    Comment


      #3
      Sure thats great but how do I get the playercontroller reference in the widget?

      I mean my code works on the server, but when executed on the client it doesn't possess the new actor it spawns, it spawns it but does not possess it..

      EDIT: Figured it out...didn't make my "Begin Movement" a clientside operation..
      Last edited by Zhiqua; 11-13-2019, 04:18 PM.

      Comment

      Working...
      X