Gamemodes using blueprints

So my team and I are kinda stuck. We don’t have many coders and they are busy as ever with personal stuff as their current assignments. So we wanted to have gamemodes like (Team) Deathmatch and Capture the Flag in blueprints. But I couldn’t find ANY tutorial about it. All I could find is how to make a gamemode blueprint class. But there is nothing about detecting who died, who killed him, how to track the score, a time limit and how to end the game.
Any ideas?

Thanks in advance!

First you need to understand what what you want is not in engine… it something you need to code, UE4 don’t even have health system, only damage system. Take all problems individually, start with making pawns with health and weapons to take damage,

As you can see UE4 has damage system for any actor, but it only for notifying damage, you still need to code the cause and effect. So with weapons you fire line traces (https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html) and projectiles, when they hit actor you make him take damage and actor reponce to that by reduceing it’s own health. Once you do that you will notice that whole “detecting” is all about one actor informing that something happened to another, so if health is 0 and pawn dies you inform PlayerController about it (actully it is informed by unpossesing the pawn) and you inform GameMode about it and GameMode do something about it like give score and so on. Time limit is also something you need to create for yourself, just create timer that will end the game, note that Game Mode already has match stageing which you can read about in this link:

As for diffrent game mode, first create Free for All with basic score system, then create Team DM Mode that based for Free for All game mode, this way you will have everything that Free for All has, but you will override and add team support from it. Then from Tem DM GameMode you can make CTF or other team modes, as TeamDM has a basis of team deathmatching, but you add extra rules to it. Thats how GameModes are constructed in Unreal Tournament

Learn about framework:

Learn the APIs (which is also good way to discover features):

Also explore Pallate window which has most modes in single tree. Don’t be shy to check API refrence, functions athat are marked with blue note icon are also blueprint nodes:

All those functions are on your desposele and just use them

What you mentioned is literally what we already have. The issue is how to detect which player is killed by whom mainly. Who killed who? Who should get the points? Uou say “create team DM mode”. That’s the issue. How to do it in blueprints?

And all those variables of the last link are C++. I specifically asked for a Blueprint method.

Shadow,

Nice set of links, thanks!

Who should get the points? That’s up to you, your designing the game, how do you want it to work? Who killed whom? That would seem straight forward enough, the person that fired the “bullet” that reduced the health to zero or less. Upon collision of the bullet, you should be able to trace the bullet back to the owner, assuming your spawning the bullet by the “actor” that is firing the bullet.

As to the C++, Shadow was not trying to get you do anything in C++, but that the documentation for the C++ is very helpfull when doing work with blueprints. As he stated, “Don’t be shy to check API refrence, functions athat are marked with blue note icon are also blueprint nodes:”, this you should be taking advantage of.

When you detect collisions, you know exactly which actor hits what actor. in case of projectiles you need to associate them with player pawn that fire them, you can do that by setting owner (i’m not sure if you can do that in blueprint, if not then make your own varable in projectile). In case of line tracing, inform pawn that got hit who did it. When heath reach 0, the one who send last hit is the killer simple as that (so good would be if you have variable for who hit last). Again it all about one actor informing another actor, who do what.

Also i said what you need to do with game modes, make free for all, the from FFA make Team Mode and from Team Mode make other Team Modes. IF you asking how to do team mode, then you need to do it your self as UE4 don’t have team mode. It would be good if you make team class with team specific data and code, you spawn one for each team in GameMode and obviuesly you hold them in array, then in PlayerController you hold pointers to those team objects and they will be identifications on which team player they are in and then make pawn set accordingly to it (for example team class has color information, make pawn set color on material do it will be read or blue or whatever). Thats just one possible way to do it.

“And all those variables of the last link are C++. I specifically asked for a Blueprint method.”

Thats why i told you to not be shy, because you rejected only because you see C++ (which i expected because it’s normal in blueprint community, they run away seeing C++). Blueprint are using same classes and API as C++ and i told you that blueprint nodes there are marked with blue icon, I give you this link so you can see full view of GameMode class, it actully better view then Blueprint APIs documentaion because oyu got all GameMode related functions on single list, where Bleuprint documentation spreads it in multiple categories. Please try it.