How to spawning a randomly selected player as a different character from others?

Hello. I’m working on a project. I feel a little lost. I want to spawn a character I chose among the player controllers with a different mesh in the others. This mesh will be the child of the class used by other players. I am grateful for your help.


Override GetDefaultPawnClassForController in your Game mode to return the default pawn for most controllers but select a different pawn for randomly chosen one.

I would advice against spawning the players manually. Use the functionality already provided in the GameMode.

1 Like

Create a Cosmetics struct set as Rep Notify.
When the server spawns the default class have it Set the cosmetics struct.

The onrep_cosmetics struct will do the work of changing the character based on the structs values.

Skeletal Mesh, Materials, Actor Components etc.