Problem: I am using a widget which comes up on play (right now a single button) and the player starts in spectator mode. When you click the button it currently does nothing (since I deleted the blueprint and trying from scratch).
Aim: When you click on the button I want it to spawn the player ‘in a specified location’ using the player blueprint I created instead of the default pawn class spectator.
Any help appreciated! and thanks in advance!
I basically want to allow the user to spawn where they want using a button (4 buttons for example, left side of map, right side of map, top of stairs and in house). Hopefully this sums it up.
Here i s a solution :
Level Blueprint ( 2 Target point are placed in different locations )
Hello, thank you for the reply this is exactly what I was looking for. Are you able to try this with multilayer? I managed to get my own working but only the hosting client could posses the pawn when spawned.
This is what I had
sorry i didn’t touch networking yet
I know it’s 3 years later, but for those who are checking this out.
To get this to work outside widgets, you need to call an event from the player controller who owns this widget. Widgets don’t communicate well with the server (because they don’t exist there). So you add an event to your player controller (PC is the easiest way to do this, because you can call it from a widget blueprint by 'get owning player ’ and CastTo_YourPlayerCharacter and then choose the event to run). You want this event to be Run On Server (choose from the replication dropdown menu), because you don’t want clients spawning things that have a gameplay effect…