{"name":"setTriggerStatements","operator":null,"title":"setTriggerStatements","type":"command","url":"https://community.bistudio.com/wiki/setTriggerStatements","revid":378812,"updated":"2026-06-30T19:31:33Z","groups":["Triggers"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"trigger","type":"Object","optional":false,"default":null,"description":"trigger object","types":["Object"],"since":null,"text":"trigger: Object - trigger object"},{"name":"condition","type":"String","optional":false,"default":null,"description":"code containing trigger condition. Special variables available here:\n- this (Boolean) - detection event\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities","types":["String"],"since":null,"text":"condition: String - code containing trigger condition. Special variables available here:\n- this (Boolean) - detection event\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities"},{"name":"activation","type":"String","optional":false,"default":null,"description":"code that is executed when the trigger is activated. Special variables available here:\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","types":["String"],"since":null,"text":"activation: String - code that is executed when the trigger is activated. Special variables available here:\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"},{"name":"deactivation","type":"String","optional":false,"default":null,"description":"code that is executed when the trigger is deactivated. Special variable available here:\n- thisTrigger (Object) - trigger instance","types":["String"],"since":null,"text":"deactivation: String - code that is executed when the trigger is deactivated. Special variable available here:\n- thisTrigger (Object) - trigger instance"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"trigger","types":["Object"]},"right":{"text":"[condition, activation, deactivation]","types":["Array"]}}],"examples":[{"text":"```sqf\n_trg setTriggerStatements [\"this\", \"hint 'trigger on'\", \"hint 'trigger off'\"];\n```","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)\", \"\"];"]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Triggers","Introduced with Armed Assault version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}