# 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="/files/psbJ4CxxYjWImiNdvPv8" alt=""><figcaption></figcaption></figure></div>

#### Condition RPC

<figure><img src="/files/JoqfF0nCnA8UOqtjTQBE" alt=""><figcaption></figcaption></figure>

#### Trigger RPC

<figure><img src="/files/w5JONB57kxWibB7V7oQR" 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="/files/VLFt6w1zZLBf7WLC7pMz" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ninjutsugames.com/game-creator-2/fusion-module/remote-procedure-calls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
