How to create your own gamemode?
- InCodeWeTrust
- Contributor
- Posts: 18
- Joined: Wed Mar 27, 2019 10:05 am
To create a new game mode you will actually create it, which would require you to code the logic.
- InCodeWeTrust
- Contributor
- Posts: 18
- Joined: Wed Mar 27, 2019 10:05 am
That all depends on what it is. For instance something simplier -> I wrote my own vital slider controller for various vitals like stamina health armor etc.
This required some hooks into these scripts:
bl_PlayerUIBank.cs
bl_PlayerHealthManager.cs
and for example: I changed the HealthBar type from Image to my new script PlayerStatSlider to hook into it. I try not alter the code base directly and if I do minimal to provide links to my mods to manipulate MFPS. This way you can update without losing too much of your own mods.
To approach a gamemode, I would first look at how one is currently handled. IE: Gunrace -> This is one of the simpliar game modes to examine and look at to approach creating your own. You need to create UI for this new game mode and add it to every game scene. Add it to lobby script and game data if needed for options and a game mode script that runs that gamemode for points or kills or whatever your tracking.
You really need to understand how MFPS works under the hood before you can extend it. Good news its coded pretty clearly and a big community behind it so if you get stuck I am sure you can just ask.