Team Select in Blue Prints for Multiplayer

There have been some questions and requests for help with making team select in a multiplayer game. I’ve decided since I’m rewriting my code for Ultraball (http://www.ultraballgame.com vote for my greenlight soon!) to go over how I accomplish this in an example project that is all blue prints.

Ultimately we want to stream line all players to funnel into a dedicated server much like team fortress where you pick a team and join it. No lobby needed.

In this example project we are going to do the following.

  1. Create team spawn points and spectator spawn point
  2. By default you join as spectator
  3. We use a custom spectator class because true spectator cannot cast to game mode as they are not considered a player.
  4. We will keep our widgets on PC because we don’t want to lose access to them when changing classes of pawn
  5. We will also have the game mode keep track of player starts so we don’t spawn on top of each other by going through a list.
  6. We will have a chance team bind on PC so we can access it even when we have destroyed our character
  7. We will use various built in overrides and built in functions to keep this simple.

Download Link:

or
http://www.ultraballgame.com/downloads/TeamSelect.zip

I didn’t parse out the starter content that was not used so its 671Megs UE4 v4.15.0

I’ll be making a video explaining the building of this system soon enough.




Included:

  1. Team Spawns for team players adjustable by a simple enumeration var.
  2. Replicated Health Bars over players
  3. Damage by world placed object on overlap.
  4. Regeneration of health by pickup in world.
  5. Use of blur in UMG.
  6. Skin Change based on Team when possessing Character
  7. Use of Spawn Points through array to ensure players do not spawn in the same place.
  8. Override use in game mode for Choose/Select Player Start.
  9. Override use in game mode for Choose Default Pawn
  10. Use of RestartPlayer to make it all possible.

Amzaing!!!

thank you very much!

No problem. I’m gonna throw in a few more things to this to complete it.

  1. Flag
  2. Capture point for flag
  3. Umg representation of captures per team.
  4. Player drops flag when dead or disconnects.
  5. Simple line trace “gun”
  6. Grenade damage.
  7. Player stats for kills and captures.

This way someone could take the base project and fly with it as an example of a working ctf game.

Thanks,:slight_smile: glad some ppl are getting done use out of it.

Working on the new version adding some things.

Just my way of paying it forward on everything I’ve learned in the last year of becoming an indie dev myself.

Ps managed to cut out unneeded assists in what I’m doing to less then 200 Megs soon enough time allotted it’ll have aim offset using animation starter pack. And ctf assets, widget based score board for team caps, players kills deaths caps sorting.

Not that we need more ctf ganes made but the fundamentals of creating these assets was hard for me to come by.

I’m unfortunately not having time to continue the project, but this includes capturing the flag picking itup, dropping it on death and a little grenede shooter that will kill yourself and other players.

Grenade launcher shoots further the longer you hold the button due to a timer.

thanks!!! and if possible make a tutorial of this project :slight_smile:

I wish I had the time mate, busy with my project been over a year need to get the alpha out :wink:

thx for sharing this!

is this game still in dev?