Skip to content

Commit

Permalink
Updated Authority Concepts page.
Browse files Browse the repository at this point in the history
Limit feed json to 2
  • Loading branch information
gtnardy committed Jan 17, 2025
1 parent b714b74 commit 4b32908
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
27 changes: 19 additions & 8 deletions docs/core-concepts/scripting/authority-concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,30 @@ Some Classes can only be spawned on the Server, others can only be spawned in th
Some methods and events in the API are only available on a specific side \(Client or Server\), others are only available in the side which spawned it Authority side\):

#### <AuthorityType.ServerOnly />**`Server Side`**
Method or Events which can only be called in the **Server** side.

- **Methods:** can be called only in the **Server** side.
- **Events**: will be triggered only in the **Server** side.

#### <AuthorityType.ClientOnly />**`Client Side`**
Methods or Events which can only be called in the **Client** side.

- **Methods:** can be called only in the **Client** side.
- **Events**: will be triggered only in the **Client** side.

#### <AuthorityType.AuthorityOnly />**`Authority Side`**
Methods or Events which can only be called in the side which spawned it.

- **Methods:** can be called only in the side which spawned this entity.
- **Events**: will be triggered only in the side which spawned this entity.

#### <AuthorityType.NetworkAuthority />**`Network Authority Side`**
Methods or Events which can be called in the **Server** and also in the **Client** if the Local Player is the Network Authority of that entity.

- **Methods:** can be called only in the **Server** side and also in the **Client** if the Local Player is the [Network Authority](#network-authority) of this entity.
- **Events**: will be triggered only in the **Server** side and also in the **Client** if the Local Player is the [Network Authority](#network-authority) of this entity.

#### <AuthorityType.Both />**`Both Sides`**
Methods or Events which can only be called in any side.

- **Methods:** can be called in both **Server** and **Client** side.
- **Events**: will be triggered in both **Server** and **Client** side.


:::tip

Expand All @@ -52,8 +63,8 @@ The Player assigned is automatically calculated by the server and takes some thi
* The **distance** from the Character to the object
* If the Character is **grabbing** a <Classes.Prop />
* If the Character is **handling** a <Classes.Pickable />
* If the Character is **driving** a Vehicle
* If the Character has just **shot** something
* If the Character is **driving** a <Classes.Vehicle />
* If the Character has just **shot** an entity (e.g. <Classes.Prop />, <Classes.Weapon />, <Classes.Vehicle />, etc)

In all this cases, the Player will be automatically assigned to be the **Network Authority** of that Object.

Expand Down Expand Up @@ -98,7 +109,7 @@ The Square in the entities represent the state in the Network Authority and it's
| Color | Meaning |
| :--- | :--- |
| **<span style={{"color": "#306CCE"}}>BLUE</span>** | You **are the current Network Authority** of that entity. <br/>You are sharing sync data to the other players. |
| **WHITE** | You **are not the Network Authority** and the entity is sleeping. <br/>The current Network Authority is not sending sync data because the entity is sleeping. |
| **<span style={{"color": "#AAAAAA"}}>WHITE</span>** | You **are not the Network Authority** and the entity is sleeping. <br/>The current Network Authority is not sending sync data because the entity is sleeping. |
| **BLACK** | You **are the Authority** of that entity. <br/>The entity was spawned on client side then you are not sending sync data. |
| **<span style={{"color": "#00A400"}}>GREEN</span>** | You **are not the Network Authority** and the entity is being synced in a **good** cadence (no lag). |
| **<span style={{"color": "#FFA500"}}>ORANGE</span>** | You **are not the Network Authority** and the entity is being synced in an **ok** cadence (small lag - < 100ms). |
Expand Down
3 changes: 2 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ module.exports = {
},
blog: {
feedOptions: {
type: 'json'
type: 'json',
limit: 2
},
showReadingTime: true,
editUrl: ({ locale, blogDirPath, blogPath }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/api
Submodule api updated 1 files
+1 −1 Classes/BaseActor.json

0 comments on commit 4b32908

Please sign in to comment.