Does anyone know a way to have a team deathmatch style game.? I know in UDK there was a option that set the gametype as team deathmatch. Is there anything like that in UE4? if not how would i go about making it in blueprint.
As far as i know, you can do that with c++. Check out the Shooter Game example. It has 2 different Gamemodes.
It could be that there is a node that changes the Gamemode with BP, but i don’t know.
It wouldnt harm you, if you learn a bit c++. It’s not that hard and makes it easier to achieve what you want.
What if i did something like epic did in the shooter game with their bots. They had a Character blueprint with the character and the bot. Could i do something like that but One for Red team and one for Blue Team and reference them by the blueprint names? Would something like that work?
Example: There is a Objective to capture. Red Player (First Character Blueprint) stands in the area and captures it then runs off then Blue Player (Second Character Blueprint) Uncaptures it then captures it for his team.
Hm, i don’t really know how they did it. I only used the ShooterGame for the OnlineSubsystem.
If you want to do it with Blueprints so badly i would try to only use one character BP. I guess i would make a Variable called “Team” inside the… hm… inside the Controller maybe. And at the start of the round, you can choose to join blue or red team. That will be set to your variable. Than i would also use a replicated function to set this variable for all other clients and the server. So every client knows what team yours is.
Now if you do something like a capture the flag, you could just check this variable. You could also make a scoreboard by using a for loop and going through the Controllers, taking all red players to the left side and all blue player to the right side. You should also be able to get the controlled pawn (and maybe its player state class) to get some information about kills.
But i don’t know if this could really work. I would rather recommend you to learn c++ and use the code from the ShooterGame to understand Team and use it for your own project.
Ok Thanks does anyone else know if something like this is possible in blueprint? If so im sure there are alot of people who would like to find out.
Why don’t you just take a look at how it was done in UDK? I believe the gameinfo created two TeamInfo’s. Each player would be assigned a team upon joining the server (i think). It’s been a while since i’ve seen the UDK code for this but it shouldn’t be hard to recreate if you study it for a bit.
Yes but kismet had a way to define multiple players so you could create teams. But as eXi said there is no way currently in blueprint to separate multiple players into a “team”.
That’s why i said recreate, anyway i quickly created something for you to study and work from. you can download it here. This is just something to give you an idea on how to handle teams, not something ready to be used without further work.
Ok, Thanks for that. But i have a question. Why is it when i play with two clients they are in seperate instances of the same map. Is this ment to happen and how can i fix it?
Ok Thanks for that. But i have a question. Why is it when i play with two clients they are in separate instances of the same map. Is this meant to happen and how can i fix it?
I’m using Play with New Editor Window and Number of Clients = 2. Because nothing visible is set up for replication, it appears as if they are 2 different maps. However if you use the console command Show Collision, you can see the collision cylinder of the other instance.
Ok i see what you mean now thanks. Ive been trying to study this but theres a few things i cannot figure out. I dont really see anything to define the two teams. What nodes would i call to define the two seperate teams?. For example If i have red team that captures a area then the area turns red and blue will see that its red. But if blue goes to a red area and capture it the it turns blue. What i mean is i don’t really see a way to call the 1 team at a time. Is this something that is there or is it somethat i have to add. Basically i mean is there something like “get team1” i can drop in and go from there.
Let’s start with a flag that belongs to team red, this means the flag must have a variable (in my example it would be TeamInfo) to check what team owns the flag. If you only want something to happen when a player of the opposite team enters the area, you can check the flag’s TeamInfo vs the player’s TeamInfo. When the player captures the flag/area simply set the flags TeamInfo to the players TeamInfo.
That’s why i wanted you to seperate the teams with a variable. If you check the variable of a player, you can than determine on which team he is.