Skip to content
On this page

AthenaShared.interfaces.interaction.Interaction ​

shared/interfaces/interaction.Interaction

By default Interactions are supported for vehicle and player.

This interface is used to pass interaction information form server to client.

Interface

Interaction

Properties ​

callback ​

• Optional callback: (player: Player, ...args: any[]) => void

Type declaration ​

Usage

AthenaShared.interfaces.interaction.Interaction.(player, ...args): void

What function to call back after the player has interacted with the Interaction Point

Parameters ​
NameType
playerPlayer
...argsany[]
Returns ​

void

Defined in ​

shared/interfaces/interaction.ts:51


data ​

• Optional data: any[]

Data to pass back through the callback. Serves as a way to pass unique data through the callback.

Defined in ​

shared/interfaces/interaction.ts:81


debug ​

• Optional debug: boolean

If set to true debug information will be sent to console.

Defined in ​

shared/interfaces/interaction.ts:110


description ​

• Optional description: string

Description of what the Interaction does

Defined in ​

shared/interfaces/interaction.ts:22


dimension ​

• Optional dimension: number

What dimension this player must be in to use this colshape.

Defined in ​

shared/interfaces/interaction.ts:45


height ​

• Optional height: number

Overrides the height for the interaction.

Defined in ​

shared/interfaces/interaction.ts:103


isPlayerOnly ​

• Optional isPlayerOnly: boolean

Should this interaction only work if the player is on foot?

Defined in ​

shared/interfaces/interaction.ts:95


isVehicleOnly ​

• Optional isVehicleOnly: boolean

Should this interaction only work if the player is in a vehicle?

Defined in ​

shared/interfaces/interaction.ts:88


onEnterCallback ​

• Optional onEnterCallback: (player: Player, ...args: any[]) => void

Type declaration ​

Usage

AthenaShared.interfaces.interaction.Interaction.(player, ...args): void

Called when a player has entered an interaction point.

Memberof

Interaction

Parameters ​
NameType
playerPlayer
...argsany[]
Returns ​

void

Defined in ​

shared/interfaces/interaction.ts:73


onLeaveCallback ​

• Optional onLeaveCallback: (player: Player, ...args: any[]) => void

Type declaration ​

Usage

AthenaShared.interfaces.interaction.Interaction.(player, ...args): void

Called when a player has left an interaction point.

Parameters ​
NameType
playerPlayer
...argsany[]
Returns ​

void

Defined in ​

shared/interfaces/interaction.ts:66


position ​

• position: IVector3

The position in the 3D space of where this interaction should be. Remember to subtract 1 from the z axis if you're using player coordinates.

Defined in ​

shared/interfaces/interaction.ts:31


range ​

• Optional range: number

The max distance in which this interaction can be interacted with.

Defined in ​

shared/interfaces/interaction.ts:38


triggerCallbackOnEnter ​

• Optional triggerCallbackOnEnter: boolean

Forces the callback to immediately trigger without actually interacting.

Defined in ​

shared/interfaces/interaction.ts:59


uid ​

• Optional uid: string

A unique identifier for the Interaction

Defined in ​

shared/interfaces/interaction.ts:15

Created by Stuyk | Est. 2020