Skip to content

PingDef beta ​

Interface of @v12-engine/client

ts
export interface PingDef

A kind of ping a player can send (GameView.pings.kinds): what it says, how it looks and sounds, who hears it, where it is on the wheel

Members ​

audience ​

ts
audience?: 'allies' | 'all';

Who hears it: the player's side (default), or everyone in the game

color ​

ts
color?: string;

CSS colour: of the mark, the ring, the minimap and the wheel's item. The pinger's own colour when left out

cooldown ​

ts
cooldown?: number;

Seconds before this player may send this kind again, over the rules' limit for all pings: none when left out

focus ​

ts
focus?: boolean;

Whether a click on its chat line looks there: yes when left out

fx ​

ts
fx?: string | FxDef;

An effect played at the spot (a def, or a name of GameView.fx.defs): two rings of the colour when left out

glyph ​

ts
glyph?: string;

A mark drawn in a circle of the kind's colour where there is no picture: "!", "?", "➜"

icon ​

ts
icon?: string;

A picture of the kind: an address (a file of the game's). glyph is drawn where there is none

id ​

ts
id: string;

The kind's id, as the engine's rules name it (RuleSettings.talk.pings.kinds)

label ​

ts
label: string;

What the wheel shows and the chat line says: "Enemy missing"

render ​

ts
render?: 'scene' | 'overlay' | PingDraw;

How its mark over the spot is drawn: in the scene over everything, facing the camera (default), on the overlay canvas as a word in a dark round box, or by the game's own (PingDraw)

says ​

ts
says?: string | false;

What the chat says of it (": Enemy missing!"): the label when left out; false for no line

seconds ​

ts
seconds?: number;

Seconds the mark stays over the spot: 5 when left out

short ​

ts
short?: string;

A short word or mark over the spot and on the minimap: "?"

sound ​

ts
sound?: string;

A sound of the game's (GameView.sounds) played at the spot: the game's ping sound when left out

wheel ​

ts
wheel?: {
        slot?: number;
        hidden?: boolean;
    };

On the wheel: at which slot (0 is up, then clockwise; the defs' order when left out), or not on it