Change the Game Mode? or how to swap the players avatar

I have some streaming levels with a master level.

I have two game modes:
Mode 1 where the player controls a third person character -they can use the contrller to move around and some other stuff,
Mode 2 where the player controls a camera -they can use the game controller to rotate the camera and zoom and stuff.
Each has its own set of controls.

Because I thought it would be more efficient (in case i need to change some assets) to make 1 project
When the game starts I want it to be either in Game Mode 1 or Game Mode 2. This could be read from a .txt file. Something like that.

How can I do this?

You don’t need different GameModes. Just spawn both character types and tell the player controller to Possess() whichever character it needs to use.

Possessing spawned character [SOLVED] - Programming & Scripting / Blueprint - Epic Developer Community Forums

1 Like

You can use Enhanced input system for create multiple input mapping contexts. Create player and spectator pawn, in SetupPlayerInputComponent function bind desired input type. Use Posses function for change controlled pawn, in PossessedBy event use AddMappingContext for apply the required context depending on the type of controlled pawn.

2 Likes

ok thankyou i will try this

1 Like

also thankyou!

1 Like