How to retrieve value of "Player Start Tag"?

Here’s the challenge:

I have some 20 PlayerStart actors spread out over my level, some are tagged with “Walker” and some with “Glider”. When re-spawning I want to choose a random “Glider” start (when I’m gliding).

What I’m trying so far:

  1. When in GameMode or PlayerController, I’m getting all PlayerStarts with “Get All Actors of Class”.
  2. Loop through the array and check with “Actor Has Tag” if the tag matches. If so, I put the PlayerStart in a separate array
  3. Pick a random entry from said array

The problem that I’m having is that there are zero matches. And what’s causing the problem is that I don’t manage to read the Tag of a PlayerStart. Even when directly trying to read the tag, it says “not in scope”.

What am I doing wrong here?

(see below an excerpt of the GM function)

im printing the string or tag or even variable and on level load the printed variable is found.
prints the tag. but refuses to spawn me consistently at that player start assigned that tag.
at my wits end on it.

So, my understanding is that:

  • There are Actor Tags, but also an attribute “Player Start Tag”, which is a different attribute that only the PlayerStart actor has. A PlayerStart Actor can have only 1 “Player Start Tag” , but any number of “Actor Tags”. Depending on your usecase, you choose the one you need.
  • You can select a PlayerStart Actor just as you do normal Actors (GetAllActorsOfClassWithTag for example and select the one you want)
  • You can also use “FindPlayerStart”. It returns a PlayerStart where the attribute “Player Start Tag” matches the “Incoming Name”

Good luck!

Yeah, and testing it works, but only once, or twice it but mostly out right fails, when it gets a wrong start, the print string of found tag is correct, the chosen start that I actually spawn at doesn’t have that tag or player start, or vector (tried many ways). It’s ok I’ll sort it, maybe use override in game mode choosestart instead of level blueprint. Thanks

could be a load order problem, try putting a delay before the GetActorsOfClass.

otherwise show us some code because it should work