i want to open level from one map level with different gamemode to another map level with different gamemode? for example( I have a ‘Mainmenu’ map level with ‘MenuGamemode’ and also ‘Mapwidget’ with buttons to open different level with different gamemode. I added ‘Mapwidget’ through ‘MenuGamemode’ eventgraph. After i Click the ‘Play’ Button another maplevel open which have different gamemode. However, the playercontroller doesnot work. it doesnot do WASD movement, shooting running. Nothing, just stund there. please help me in this
Hi
Your question is kind of vague. I’ll try to point you in the right direction and I’m sorry if those are too obvious or too shallow.
- Check what controller is set in your Non-menu game mode
- Check if the inputs are initiated:
- If using Enhanced Input check if the Add Mapping Context node is hit
- If input is on the pawn check if it is possessed
- Make sure there is no Set Input Mode UI Only node
- Check if something else can be consuming your input
2 Likes
- Are you setting the GameMode in the world properties of the level?
- In your GameMode code, are you setting the default PlayerController, Pawn, HUD, etc.?
Example game mode constructor below. If you set these up then you should just spawn with the correct type of player controller, character, and HUD already running.
APrimaryGameMode::APrimaryGameMode(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
LOG("APrimaryGameMode::APrimaryGameMode()");
// set default pawn, player controller, and HUD
// these can be read-only viewed in the editor:
// Edit >> Project Settings >> Maps & Modes >> Default Modes
DefaultPawnClass = AFirstPersonCharacter::StaticClass();
PlayerControllerClass = APrimaryPlayerController::StaticClass();
HUDClass = APrimaryHUD::StaticClass();
}