{"name":"setTriggerStatements","title":"setTriggerStatements","type":"command","url":"https://community.bistudio.com/wiki/setTriggerStatements","revid":378812,"updated":"2026-06-30T19:31:33Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Defines trigger condition, activation and deactivation statements. Trigger condition has to return Boolean. true will activate the trigger, false will deactivate it (only if activation is set to repeat). thisList returns the same result as list command, which includes all entities in the trigger area that are capable of activating the trigger. Dead entities are excluded as well as crew in vehicles, vehicles themselves are included.","syntaxes":[{"syntax":"trigger setTriggerStatements [condition, activation, deactivation]","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"},{"name":"condition","type":"String","description":"code containing trigger condition. Special variables available here:\n\n- this (Boolean) - detection event\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities","type_expr":"String"},{"name":"activation","type":"String","description":"code that is executed when the trigger is activated. Special variables available here:\n\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities\n- thisActivator (Object) Arma 3 v2.22 - what or who activated the trigger, default: thisTrigger","type_expr":"String"},{"name":"deactivation","type":"String","description":"code that is executed when the trigger is deactivated. Special variable available here:\n\n- thisTrigger (Object) - trigger instance","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[condition, activation, deactivation]"}}],"examples":[{"code":["_trg setTriggerStatements [\"this\", \"hint 'trigger on'\", \"hint 'trigger off'\"];"]},{"text":"Since Arma 3 v2.22:\n\n```sqf\n_trg setTriggerStatements [\"this\", \"hint ('Activated by ' + str thisActivator)\", \"\"];\n```","code":["_trg setTriggerStatements [\"this\", \"hint ('Activated by ' + str thisActivator)\", \"\"];"]}],"see_also":["triggerStatements","createTrigger","setTriggerActivation","setTriggerArea","setTriggerText","setTriggerTimeout","setTriggerType","Magic Variables","thisList","thisTrigger","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"],"notes":[{"user":"Scifer","date":"2011-03-14T20:52:00Z","text":"An array with three arguments is mandatory for this function."},{"user":"Heeeere's Johnny!","date":"2014-09-16T17:41:00Z","text":"Magic variable *thisList* does not contain dead units."}]}