{"name":"BIS_fnc_moduleChat","operator":null,"title":"BIS fnc moduleChat","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_moduleChat","revid":328357,"updated":"2022-07-13T16:00:47Z","groups":["Modules"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"description":"Make a list of units use any *chat command (groupChat, vehicleChat, sideChat, commandChat, globalChat).","syntaxes":[{"syntax":"[logic, units, isActivated] call BIS_fnc_moduleChat","since":null,"effect":null,"exec":null,"params":[{"name":"logic","type":null,"optional":true,"default":"\"0\"","description":"Object the logic. Possible setVariable parameters:\n- \"Text\": String - the text to be sent\n- \"Channel\": String -  a number **as a string**:\n  - \"0\": groupChat\n  - \"1\": vehicleChat\n  - \"2\": sideChat\n  - \"3\": commandChat\n  - \"4\": globalChat","types":["Object","setVariable"],"since":null,"text":"logic: Object the logic. Possible setVariable parameters:\n- \"Text\": String - the text to be sent\n- \"Channel\": String - (Optional, default \"0\") a number **as a string**:\n  - \"0\": groupChat\n  - \"1\": vehicleChat\n  - \"2\": sideChat\n  - \"3\": commandChat\n  - \"4\": globalChat"},{"name":"units","type":"Array of Objects","optional":false,"default":null,"description":"list of chatting units","types":["Array","Object"],"since":null,"text":"units: Array of Objects - list of chatting units"},{"name":"isActivated","type":"Boolean","optional":true,"default":"true","description":"if true, the module is activated and chat is send. false disables the module","types":["Boolean"],"since":null,"text":"isActivated: Boolean - (Optional, default true) if true, the module is activated and chat is send. false disables the module"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done, even if isActivated equals false","text":"Boolean - true when done, even if *isActivated* equals false"}}],"examples":[{"text":"```sqf\nmyLogic setVariable [\"Channel\", \"2\"];\nmyLogic setVariable [\"Text\", \"Hello everyone, this is side chat!\"];\n[myLogic, [player], true] call BIS_fnc_moduleChat;\n```","code":["myLogic setVariable [\"Channel\", \"2\"];\nmyLogic setVariable [\"Text\", \"Hello everyone, this is side chat!\"];\n[myLogic, [player], true] call BIS_fnc_moduleChat;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["groupChat","vehicleChat","sideChat","commandChat","globalChat","systemChat"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Modules","Functions","Functions: Local Effect","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}