SetTrigger Function

Adds or changes an existing trigger in the trigger list.

Syntax

int SetTrigger(
const Trigger3D&in trigger,
int id = - 1
)

Parameters

const Trigger3D&in trigger
The new trigger value.

int id = - 1
The ID of the trigger to change. If the ID is -1, a new trigger will be added.

Return value

int
The ID of the trigger that was added or changed.

Remarks

Using this function, you can either add or change the value of an existing trigger. Normally, triggers are stored in a list and are addressable by their index. However, to make it easier to address triggers, plugins use unique IDs that stay the same for the lifetime of the trigger in the list, until it is removed from it.