MatchRule
What a plugin declares to answer the match question, as matches()
does; at most one listed plugin declares one.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
scopeTraits? |
readonly Trait[] |
The traits whose add or remove can change findMatch’s answer, such as a match’s own and a member’s, which the scene hears to read a members-only body’s match again. The core’s owner, presence and control it hears itself. Left out, the scene reads the answer at each pair, as it cannot cache what it cannot hear change. |
traits? |
readonly Trait[] |
The traits its answers read, which a view of the answer, such as nameplates, watches to read it again as they change. |
Methods
Section titled “Methods”findMatch()
Section titled “findMatch()”findMatch(
world,entity):MatchEntity|null
The match entity belongs to, or null where it belongs to none.
The core asks it only for a live entity of the world, and a match’s
own entity belongs to itself.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
entity |
Entity |
Returns
Section titled “Returns”MatchEntity | null
findMatchTeam()?
Section titled “findMatchTeam()?”
optionalfindMatchTeam(world,entity):Team|null
The team entity holds in its match, a member’s slot’s or a
match’s own NPC’s, or null where the match gives it none: the team
question asks it before the team rule, so a match’s team is scoped
by its match. Left out, no match gives a team.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
entity |
Entity |
Returns
Section titled “Returns”Team | null
findRespawnPoints()?
Section titled “findRespawnPoints()?”
optionalfindRespawnPoints(world,player): {place:number;points: readonlyVector3[]; } |null
Where player, a member, comes back as the player’s character
respawns at the spawn: the match’s points for the player’s side,
and the player’s place among them, from which the core takes the
first point no character stands on. Null where the player’s match
places none, for the room’s points.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
player |
Entity |
Returns
Section titled “Returns”{ place: number; points: readonly Vector3[]; } | null
isAlly()?
Section titled “isAlly()?”
optionalisAlly(world,match,first,second):boolean|undefined
Whether first and second, both of match, fight on one side;
undefined leaves it to the team question, as a co-op match does.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
match |
MatchEntity |
first |
Instigator |
second |
Entity |
Returns
Section titled “Returns”boolean | undefined
isDamageAcrossMatchesEnabled()?
Section titled “isDamageAcrossMatchesEnabled()?”
optionalisDamageAcrossMatchesEnabled(world):boolean
Whether a hit lands between two matches, and between a match and an entity in none. Left out, or false, each is spared.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
Returns
Section titled “Returns”boolean
isDamageOutsideMatchesEnabled()?
Section titled “isDamageOutsideMatchesEnabled()?”
optionalisDamageOutsideMatchesEnabled(world):boolean
Whether a hit lands between two player-backed entities in no match. Left out, or false, it is spared, so the park is safe.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
Returns
Section titled “Returns”boolean
readMatchNumber()?
Section titled “readMatchNumber()?”
optionalreadMatchNumber(world,match):number
The contest match plays now, a number that rises at each reset,
which an instigator keeps as it acts. Left out, every contest is 0.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
match |
MatchEntity |
Returns
Section titled “Returns”number
readMatchTeams()?
Section titled “readMatchTeams()?”
optionalreadMatchTeams(world): readonlyTeam[]
Every team a match gives, which a team’s key is read back by.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
Returns
Section titled “Returns”readonly Team[]