{"name":"getFriend","operator":null,"title":"getFriend","type":"command","url":"https://community.bistudio.com/wiki/getFriend","revid":348505,"updated":"2023-11-08T13:01:33Z","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":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns if sides are friendly or hostile. For a value smaller than 0.6 it results in being enemy, otherwise it is friendly. See also Side Relations.","syntaxes":[{"syntax":"side1 getFriend side2","since":null,"effect":null,"exec":null,"params":[{"name":"side1","type":"Side","optional":false,"default":null,"description":null,"types":["Side"],"since":null,"text":"side1: Side"},{"name":"side2","type":"Side","optional":false,"default":null,"description":null,"types":["Side"],"since":null,"text":"side2: Side"}],"returns":{"type":"Number","types":["Number"],"description":"decimal value between 0.0 to 1.0","text":"Number - decimal value between 0.0 to 1.0"},"form":"binary","operator":null,"left":{"text":"side1","types":["Side"]},"right":{"text":"side2","types":["Side"]}}],"examples":[{"text":"```sqf\nvalue = west getFriend east;\n```","code":["value = west getFriend east;"]},{"text":"```sqf\n_isEnemy = side _killer getFriend side _victim < 0.6;\n```","code":["_isEnemy = side _killer getFriend side _victim < 0.6;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setFriend","BIS_fnc_sideIsFriendly","BIS_fnc_sideIsEnemy","Side Relations"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Sides","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}