{"name":"list","operator":null,"title":"list","type":"command","url":"https://community.bistudio.com/wiki/list","revid":378370,"updated":"2026-04-03T16:47:58Z","groups":["Triggers"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"description":"List of units that would activate given Trigger.\n\nIt returns nothing before the simulation started, i.e. in (undelayed) init.sqf files. Returns a **pointer** to the trigger's list after the simulation started.\n\nSince this is just a *reference* this means that the value in your local variable will change as the content of the trigger area changes.\nTo permanently copy the returned list to a different variable, use `_mylist = +(list triggerOne)`.\n\nThe second example can be used inside the trigger (in that case, no need to name your trigger).\n\nThe list returned for trigger of type \"Not present\" is the same as that returned for type \"present\".\n\n> [!IMPORTANT]\n> While the command can query any trigger, local or remote, the result will be only for the trigger condition set on the local client. See createTrigger for more info.","syntaxes":[{"syntax":"list trigger","since":null,"effect":null,"exec":null,"params":[{"name":"trigger","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"trigger: Object"}],"returns":{"type":"Nothing or Array of Objects","types":["Nothing","Array","Object"],"description":null,"text":"Nothing or Array of Objects"},"form":"unary","operator":null,"left":null,"right":{"text":"trigger","types":["Object"]}}],"examples":[{"text":"```sqf\n_triggerList = list _triggerOne;\n```","code":["_triggerList = list _triggerOne;"]},{"text":"```sqf\nhint format [\"%1\", thisList];\n```","code":["hint format [\"%1\", thisList];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setTriggerActivation","createTrigger","thisList"],"notes":[{"user":"TeaCup","date":"2013-03-06T14:15:00Z","text":"Calling list immediately after creating a trigger via createTrigger (and setting up activation, area, statements, timeout, etc..), will return `<null>` instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array."},{"user":"7erra","date":"2021-01-06T01:58:00Z","text":"The resulting array is not modifiable. Any array related commands, that modify the original array, will fail with the error message: `Error Reserved variable in expression`."}],"categories":[]}