Network Signals
Overview
export default class PotionManager extends AirshipSingleton {
// Creating a NetworkSignal
private usePotion = new NetworkSignal<{ potion: string }>("UsePotion");
public override Start(): void {
if (Game.IsClient()) {
// Tell the server that the local player is trying to use a potion
this.usePotion.client.FireServer({ potion: "health" });
}
if (Game.IsServer()) {
// Listen for a player use potion request
this.usePotion.server.OnClientEvent((player, event) => {
const hasPotion = DoesPlayerHavePotion(player, event.potion);
if (!hasPotion) return;
// Apply the potion's effect
player.character?.SetHealth(100);
});
}
}
}Network Signals
Example Use Cases
Example
Explanation
Example
Explanation
Creating a Network Signal
Client -> Server

Server -> Client

Data Limitations
Caching
Last updated