named
named: (PlayerQuery, string) -> PlayerQueryKeep only those whose whole name matches, ignoring case and markup: | separates alternatives and * is any run of characters.
names- The name pattern.
scene:players()| Method | Returns | Description |
|---|---|---|
named(string) | PlayerQuery | Keep only those whose whole name matches, ignoring case and markup: | separates alternatives and * is any run of characters. |
containing(string) | PlayerQuery | Keep only those whose name contains the text, ignoring case and markup: | separates alternatives. |
within(number) | PlayerQuery | Keep only those within a radius of the local player. |
withinArea(WorldArea) | PlayerQuery | Keep only those inside an area. |
withinPath(number) | PlayerQuery | Keep only those a walk of at most steps reaches from the local player. |
reachable() | PlayerQuery | Keep only those the local player can walk to. |
interactable() | PlayerQuery | Keep only those the local player can act on right now. |
interactableWithin(number, boolean) | PlayerQuery | Keep only those actable from within a range. |
hasLineOfSight() | PlayerQuery | Keep only those with a clear line of sight to the local player. |
count() | number | How many survived the narrowing. Consumes the query. |
nearest() | Player? | The nearest survivor. Consumes the query. |
collect() | { Player } | Every survivor, nearest first. Consumes the query. |
| Method | Returns | Description |
|---|---|---|
SceneDomain.players | PlayerQuery | A query over every other player in the scene, whose terminals hand out Player handles. |
namednamed: (PlayerQuery, string) -> PlayerQueryKeep only those whose whole name matches, ignoring case and markup: | separates alternatives and * is any run of characters.
namescontainingcontaining: (PlayerQuery, string) -> PlayerQueryKeep only those whose name contains the text, ignoring case and markup: | separates alternatives.
textwithinwithin: (PlayerQuery, number) -> PlayerQueryKeep only those within a radius of the local player.
radiuswithinAreawithinArea: (PlayerQuery, WorldArea) -> PlayerQueryKeep only those inside an area.
areawithinPathwithinPath: (PlayerQuery, number) -> PlayerQueryKeep only those a walk of at most steps reaches from the local player.
stepsreachablereachable: (PlayerQuery) -> PlayerQueryKeep only those the local player can walk to.
interactableinteractable: (PlayerQuery) -> PlayerQueryKeep only those the local player can act on right now.
interactableWithininteractableWithin: (PlayerQuery, number, boolean) -> PlayerQueryKeep only those actable from within a range.
rangerequireLineOfSighthasLineOfSighthasLineOfSight: (PlayerQuery) -> PlayerQueryKeep only those with a clear line of sight to the local player.
countcount: (PlayerQuery) -> numberHow many survived the narrowing. Consumes the query.
nearestnearest: (PlayerQuery) -> Player?The nearest survivor. Consumes the query.
nil when none survived.collectcollect: (PlayerQuery) -> { Player }Every survivor, nearest first. Consumes the query.