{"name":"BIS_fnc_respect","operator":null,"title":"BIS fnc respect","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_respect","revid":323931,"updated":"2022-07-01T11:58:28Z","groups":["Sides"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"RESpect - The Effective Calculation Process.","syntaxes":[{"syntax":"[mode, param1, param2, param3] call BIS_fnc_respect","since":null,"effect":null,"exec":null,"params":[{"name":"mode","type":"String","optional":false,"default":null,"description":"**case-sensitive**, can be one of \"SET\", \"ADD\", \"MODIFY\", \"KILLED\"","types":["String"],"since":null,"text":"mode: String - **case-sensitive**, can be one of \"SET\", \"ADD\", \"MODIFY\", \"KILLED\""},{"name":"depending on mode","type":null,"optional":false,"default":null,"description":"- \"SET\" - set respect default values\n  - param1: Nothing or Object (see **Return value**)\n- \"ADD\" - add respect values depending on global town respect\n  - param1: Object - unit to which is given respect from assigned town with random difference defined in third argument\n  - param2: Number - range of random difference\n- \"MODIFY\" - change given respect value\n  - param1: Object - unit of which respect value will be changed\n  - param2: String - faction of which respect will be changed\n  - param3: String - code which defines formula for change (current respect value is stored in variable _r) - e.g. \"_r / 2\"\n- \"KILLED\" - modify global town respect after civilian has been killed\n  - param1: Object - killer\n  - param2: Object - town logic\n  - param3: Number - change coefficient","types":[],"since":null,"text":"depending on *mode*:\n- \"SET\" - set respect default values\n  - param1: Nothing or Object (see **Return value**)\n- \"ADD\" - add respect values depending on global town respect\n  - param1: Object - unit to which is given respect from assigned town with random difference defined in third argument\n  - param2: Number - range of random difference\n- \"MODIFY\" - change given respect value\n  - param1: Object - unit of which respect value will be changed\n  - param2: String - faction of which respect will be changed\n  - param3: String - code which defines formula for change (current respect value is stored in variable _r) - e.g. \"_r / 2\"\n- \"KILLED\" - modify global town respect after civilian has been killed\n  - param1: Object - killer\n  - param2: Object - town logic\n  - param3: Number - change coefficient"}],"returns":{"type":"- \"SET\": Array with zero respect values (if Object is passed as argument, 1 is on place of object's faction)","types":["Array","Object"],"description":"\"ADD\": unit's respect values - \"MODIFY\": modified respect value - \"KILLED\": modified town respect value","text":"- \"SET\": Array with zero respect values  (if Object is passed as argument, 1 is on place of object's faction)\n- \"ADD\": unit's respect values\n- \"MODIFY\": modified respect value\n- \"KILLED\": modified town respect value"}}],"examples":[],"multiplayer":null,"problems":null,"aliases":[],"see_also":["addRating","Ambient Civilians"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Sides","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}