Check for unique triggers||doc135693

September 20, 2022

Format

 Trigger.CheckTriggersOnly(cfg, name, context)
  • The class to which the function belongs:Trigger

Description

The object's trigger is triggered by the configuration information of the specified object, and the global trigger will not be triggered.


Parameters

Variable name type Description
cfg config The configuration information of the object that needs to trigger the event
name string event name
context variant Context information carried when the callback function is triggered


Code Samples

local blcokCfg = Block:GetNameCfg("myplugin/grass")
Trigger.CheckTriggersOnly(blcokCfg, "BLOCK_ONLY_TRIGGER", {})