Community Tutorial: Lyra: Team-based Spawn Points

Want to ensure spawn players in their own base, or otherwise assign a team to spawn points?

https://dev.epicgames.com/community/learning/tutorials/XjBe/unreal-engine-lyra-team-based-spawn-points

Really nice addition to the spawning.
I was still having bots from enemy teams spawning in the wrong zone. (Not players only bots)
The fix I worked out was clearing the “Team Starts” array at the start of the function.

Ah did you make TeamStarts a regular variable instead a local one?
A local variable should be empty each time.
A regular one would keep growing.

I m sorry may sound dump

but where is this TeamStart and FindPlayerStart ?

Big thanks if you can help

On the left where you see “Functions” → override or in your case “Substituer”, you’ll see FindPlayerStart.

And TeamStarts is a local variable you add to that.

1 Like

Thanks you for taking time to respond

I think i get it for Function part thanks you

For the variable not sure
i m sorry i m really beginer but can be usefull for other beginer that pass here

should i do that for the function ? wich one i select ? object / class ?
maybe i m all wrong…
thanks again


for the moment error because i didnt redonne the node with new variable team starts

is that the good LOCAL ?

maybe if found the array


is that usefull ?

if it s correct maybe those screen shot would be usefull for total noob like me

next step i didbnt figure out yet

Right click FindPlayerStart to get the Parent call node.

Now in your LyraPlayerStarts > Player Start Tag, enter either Red or Blue. The red team will always spawn at a random “Red” and blue at a random “Blue”.

Names are set by the team data asset (ex. TeamDA_Red).

Is that here ?

i modified with TeamDA_Blue or TeamDA_Red but bot and player keep spawning random team color and place … (i place at distinct zone)

I keep update

Tanks again

That’s how I learn, by just doing it.

:evergreen_tree:

That should do it. Just make sure it appears under “local variables”. Otherwise it won’t start empty each time.

:evergreen_tree:

We only use the Parent Function at the end, as a fallback in case there are no player starts. Then it runs as default would. We don’t want it otherwise.

:evergreen_tree:

That needs to be “Red” or “Blue” or whatever the team name is.
Needs to match this team short name:

Lemme know how it goes :factory_worker:

1 Like

Thanks for reply !

effectively i didnt set the good name

So i tried with the short name (that match each TeamDA short name). I was confident … but it didnt work …

like all character spawn often at same place now …

maybe i will retry from a fresh new Lyra project … maybe that messing up with some other change i made other place …

best regards

or could it be this option of the wolrd setting ? game mode override ?

EDIT .
IT WAS that

i put those setting and now IT IS WORKING ! that s fantastic
i will try to put that in order for noob like me so they can follow all detailed step

thanks again is that fantastic !
I feel you just made a big chunk of my game lol

I still have one question in case
i would like to change spawn location after death for some game mode
is it something possible to do ? could i had a second tag to the spawn so it can be used in certain condition ? should i work with your BP script or somewhere else ?
maybe so clue here