Download

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.

2017-03-23_23-50-28.png
2017-03-23_23-53-10.png
2017-03-23_23-57-36.png
2017-03-23_23-58-26.png

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.

I even tossed in the health bars and orbs to collect to regain health which respawn on a delay.

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.

Hi Inph1del
Just wanted to say Thank You for sharing this.
Definitely worth checking out!

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.

https://www.youtube.com/watch?v=QaPt-gFXy5o

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:

Wow awesome tutorial

Useful Links:
Free Steam Keys
Best Graphics Card 2017

thx for sharing this!

is this game still in dev?

Do you know how I would link the health bar to a different character? I want to use it for my game. I copied and pasted the Widget blueprint into my own project, but the event graph is empty and the HUD seems to make no mention of it.

Hello,

I tried adding your gun to my project. It works properly when I play the game in editor and shoots the laser thing as it should. However, after I packaged it, the packaged game does not show the laser. It still does damage to the other players, but it does not show the lasers being fired. Can you help me out with this problem?
By the way, although I have the laser duration set to 0.3, it still does not appear after I set it to 5, so the problem is not because it disappear too fast for the player to see it.

Picture Links: Imgur: The magic of the Internet

Thanks,