Download

How to change the default spawn class for the second player ?

Hi guys, I need your help.

I’m trying to make a simple LAN multiplayer demo with the FPS Template. I’ve duplicated the FirstPersonCharacter Blueprint to get 2 Blueprint class. One is named Hunter (default class), the other Monster. But, unfortunately, I don’t know how to spawn the Monster Blueprint. I would like the first player be a Hunter, and the second a Monster.

Indeed, when I choose 2 players in “Multiplayers Options”, and when I click on Play, my second player is also a Hunter.

How to change the default spawn class for the second player ?

I hope you could help me.

Thanks.

Well technically speaking you will not be changing the default class for the second player. As it’s a default class for the players in general. Here’s a way to do it. There are some settings in the game mode that you can click on that will keep the player from automatically spawning in the level. Look in the details panel. You’ll want to manually spawn your players and you can handle that in the game mode class. The logic that is involved in deciding who gets spawned as who is up to you. I’m not in front of the editor to show you exactly but hopefully that heads you in the right direction.

I had this problem too, Thanks for it TheFoyer:

Here is what he said SuperlawX

Thanks for your help @TheFoyer and @vegetamaker !

I’ve changed the default pawn class to a custom pawn, so when the player spawn, it’s a simple pawn, with no input : http://prntscr.com/80un3d

Then, I’ve modified the GameMode Blueprint with “Event OnPostLogin” like this : http://prntscr.com/80uo5f http://prntscr.com/80uole

The result is pretty good. My first player is a Hunter, and my second a Monster.

can you make tutorial for this case thank you