Lyra starter and customization of teams

I am very surprised : If lyra starter is a starterkit recommended for making our next video games with unreal engine,
Why is it so hard for us to find any tutorials on basic customs like customizing the teams in the Elimination game mode (number of members by team, different pawn of blueprints actors by team, only bots in red team versus only players in blue team) ?
Without real tutorials for lyra, the time spent to find and conform to the lyra way is insanely greater then coding all the game from scratch in C++

3 Likes

I’ve come across your post trying to do the same things.

I managed to somehow print how many members are in a team.
Here’s what I did:

First, I implemented a getter in the LyraBotCreationComponent.h class to return the list of bots spawned.

Then in any blueprint you can get the game stat and search for the Lyra Bot Creation component. You use the above getter and loop through each bot comparing their team id with whatever you need, and at the end of the loop you can output the number.

I have tested this only with bots, but I will try to see how to expand this to real players as well and I’ll keep you updated.

Update:

You can simply get the player array from the game state and access the team from object method:

Furthermore, in the Hero blueprint I have managed to set all players to a given team by making the ChangeTeamForActor method blueprintcallable in the Lyra Team Subsystem class:

1 Like

Hi there,
In case you missed, there’s a thread covering more options:

Manually setting Team ID in Lyra…? - Development / Programming & Scripting - Epic Developer Community Forums (unrealengine.com)

3 Likes