Discussion: How to play as an other pawn than the player?

Hello,

I would like to be able to posses an other pawn than the default player pawn.

I haven’t be able so far and I already tried some things. I noticed change the default gamemode doesn’t work and creating a new one also not. Trying to posses an other pawn manually during ‘Play in viewport’ doesn’t work. This seems alle very hard coded.

Is there some-one who knows how this must be done and explain it? Are there others who have the same problem?

Thank you in advance if you know the answer and feel free discuss about it.

First of all, you need to tell your level to use your primal game data. Then you tell your primal game data to use your custom game mode. THEN you have to tell primal globals to use your modified primal game data.

Now… If you look at any extension of ShooterPlayerController, you will see there is a “enable spectator” function. Use this to unposses and destroy the actor it is controlling. Then, spawn in your new actor, and manually call “posses” on your controller, possessing the spawned actor.

Best of luck.

Thanks you for the respons.

I understand the second part, nut I never heard of primal game data. In which blueprint or menu can I adjust this exactly?

Primal game data is a blueprint, and it is very important to Ark. It holds all of the engram entries, genders, defaults, etc.

Thank you, I found it. It feel stupid I haven’t found this before, this is so useful!

Is setting ‘Primal Game Data Override’ to my custom primal gamedata, the same as telling the primal globals to use my custom primal game data?
In the PlayerController blueprint there isn’t a ‘enable spectator’ option, did I missed something?
Do you have to place the posses/unposses nodes in the event graph of the player controller?

No, you have to set both. I got very odd functionality until I did.

You need ShooterPlayerController. Cast your controller to that class specifically.

Possess and unpossess should be handled by the game state on the server.

Where exactly is the primal globals option, it’s not in the world settings?

Do I need to make my own custom PlayerController and GameState, because the ShooterPlayerController and ShooterGamestate are not editable?

Primal globals is also a blueprint.

Don’t know why I didn’t think of this sooner but if you’re looking to spawn in as a different character you can just change the default pawn in the game mode and change the “male” gender definition in the primal game data.

Note: the dropdown for genders will ONLY show children of PlayerPawnTest