GetTrigger Function

Gets the trigger with the specified ID.

Syntax

Trigger3D GetTrigger(
int id
)

Parameters

int id
The ID of the trigger to get.

Return value

Trigger3D
A valid trigger if the function succeeds, otherwise an invalid trigger with size (-1, -1, -1).
You can check if the result is valid with this syntax: if (trigger) { ... }

Remarks

For plugins, triggers are also addressable by their unique ID, unlike the remove_trigger command which receives a trigger index instead. To get a trigger by its 0 based index, use GetTriggerByIndex. The ID stays the same for the lifetime of the trigger in the list, until it is removed from it. To get all currently added triggers, use GetTriggerIds.