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?
Use a relay? Lifecycle + relay, set property to triggering player’s name + triggering player’s name? I don’t really know.
Hm, that only seems to pick one player’s name even if the relay is set to All Players.
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.
put a text that says property : player 1
player 3, etc.
Add on extra blocks to the text for this.
It still puts them all on one line?
Try enter and spaces? These might not work still.
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.
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)