List of All Players

I want to make a visible list of all the players in the game (their names). How do I do this? The only way to get a player’s name is with the Triggering Player block, so how do I get all of the player’s names, and make a text block displaying all of them?

1 Like

Use a relay? Lifecycle + relay, set property to triggering player’s name + triggering player’s name? I don’t really know.

1 Like

Hm, that only seems to pick one player’s name even if the relay is set to All Players.

1 Like

Ok… I kinda have figured out a way. It’s pretty complicated, but basically I put a zone around where everyone spawns, and when a player leaves it triggers a trigger which increments a counter which updates a property. If the property is 1, it updates a property called Player1 which sets it to that player’s name. There’s some more things, but it collects all the player’s names. Now my question is how can I separate the player’s names/put them on different lines in the text? Right now the text puts all of the names on one line, and sticks them all together.

1 Like

put a text that says property : player 1
space
Player 2
space
player 3, etc.

1 Like

Add on extra blocks to the text for this.

1 Like

It still puts them all on one line?

1 Like

Try enter and spaces? These might not work still.

1 Like

Yeah, enter just exits out of the block, and spaces just spaces it out more and more, but doesn’t put it on a separate line.

1 Like

This should work: Connect a lifecycle device to a relay, and connect the relay to a text object. Also, place down a property, make sure it is a text property. In the text object, create some block code like so:

When I receive wire pulse

Set property (propertyName) to createText(getProperty(propertyName), “, “, triggeringPlayersName)
Set text to getProperty(propertyName)