> For the complete documentation index, see [llms.txt](https://docs.ninjutsugames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninjutsugames.com/game-creator-2/fusion-module/remote-procedure-calls.md).

# Remote Procedure Calls

## Overview

Remote Procedure Calls, simply referred to as RPCs, are ideal for sharing punctual game events.

The Fusion module has 3 types of RPCs:

#### Action RPC

<div align="left"><figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-de6a882b52e3f1d58839baa981ebb5868cd2ce6a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

#### Condition RPC

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-5e307cdcc9951665f9a91ced1234bda3e7456be7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Trigger RPC

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-f0ccc301446a41e5162a457fe5d74ed7d81213c0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

All of them work the same as the original Run instructions from Game Creator 2 except that they run through the Fusion network, and the target object requires a NetworkObject.

## Parameters

### **RPC Target**

**`RpcTarget`** define on which it is executed.

* `All`: can be sent / is executed by all peers in the session (including the server).
* `Proxies`: can be sent / is executed by a peer who does not have either Input Authority or State Authority over the object.
* `InputAuthority`: can be sent / is executed by the peer with Input Authority over the object.
* `StateAuthority`: can be sent / is executed by the peer with State Authority over the object.

### **Cache State**

If enabled, the state of the trigger will be cached and sent to newly connected peers.

### Remove Cached State

If you need to remove the cached state of any of the RPCs you can use the appropriate instructio for each type of RPC.

<figure><img src="https://3895715781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDchaEIEhpBAh2gCe06%2Fuploads%2Fgit-blob-84316148f4db287fcc62836d0b895d1166def894%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
