Switching Game Mode

Hello,

I want to switch the game mode.
Example: I have a Character and I walk around.
Then I take a Car, now i need another Controller, another HUD ect.

Isn’t that the idea behind the Game Mode?

So How i can switch the Game mode in the same Level?

Best regards

Stephan

Actually it isn’t. Game Mode is more for objectives in your level. The only way in BP to change it is when loading a level. You can add the gamemode you want to use as attribute in the options.

However if you want to do multiple different input methods for different vehicles or something like that I would suggest doing that inside of the character / pawn BP. You can at any time do “Unpossess” to leave your current character / pawn and with “Possess” take control of a new character / pawn. If you handle the input inside of the character it will automatically change that with your possessed actor.

HUD is a bit different. You could use UMG and just spawn in all HUD elements when you possess a character (which is an event inside of it) and remove all of them when you unpossess it (also an event).

Personally I haven’t worked that much with the HUD class itself. It does provide quite a lot more freedom in what you want to do and how you set it up but I do primarily prototyping and UMG works well in that regard to simply have feedback and a few input buttons at all… so sadly I can not give good advice in that regard.

I hope this still helps.

Cheers!

Ok, thank you very much. I tried it with posses an unposses.
With UMG i tried earlier to add and remove works good.