{"name":"BIS_fnc_objectSide","operator":null,"title":"BIS fnc objectSide","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_objectSide","revid":341640,"updated":"2023-06-12T19:02:56Z","groups":["Sides"],"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":null,"server_exec":false},"exec":null,"description":"Returns object side as defined in config (i.e. not affected by dynamic changing like rating)","syntaxes":[{"syntax":"[target, boolean] call BIS_fnc_objectSide","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object","optional":false,"default":null,"description":"the object to be tested","types":["Object"],"since":null,"text":"target: Object - the object to be tested"},{"name":"boolean","type":"Boolean","optional":true,"default":null,"description":"false (default) to return actual object side, true to return the default config value","types":["Boolean"],"since":null,"text":"boolean: Boolean (optional) - false (default) to return actual object side, true to return the default config value"}],"returns":{"type":"Side","types":["Side"],"description":null,"text":"Side"}},{"syntax":"target call BIS_fnc_objectSide","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object","optional":false,"default":null,"description":"the object to be tested. This syntax is equal to calling the method with false as a second parameter.","types":["Object"],"since":null,"text":"target: Object - the object to be tested. This syntax is equal to calling the method with false as a second parameter."}],"returns":{"type":"Side","types":["Side"],"description":null,"text":"Side"}}],"examples":[{"text":"```sqf\nprivate _realVehicleSide = [vehicle player, true] call BIS_fnc_objectSide;\n```","code":["private _realVehicleSide = [vehicle player, true] call BIS_fnc_objectSide;"]},{"text":"```sqf\nprivate _unknownSide = [objNull, false] call BIS_fnc_objectSide; // will return sideUnknown\nprivate _eastSide    = [objNull, true]  call BIS_fnc_objectSide; // will return east\n```","code":["private _unknownSide = [objNull, false] call BIS_fnc_objectSide; // will return sideUnknown\nprivate _eastSide    = [objNull, true]  call BIS_fnc_objectSide; // will return east"]},{"text":"```sqf\n// same results\n_result1 = myVehicle call BIS_fnc_objectSide;\n_result2 = [myVehicle] call BIS_fnc_objectSide;\n_result3 = [myVehicle, false] call BIS_fnc_objectSide;\n```","code":["// same results\n_result1 = myVehicle call BIS_fnc_objectSide;\n_result2 = [myVehicle] call BIS_fnc_objectSide;\n_result3 = [myVehicle, false] call BIS_fnc_objectSide;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["side","CfgVehicles Config Reference","Side","playerSide","west","east","resistance","civilian","sideLogic","sideFriendly","sideEnemy","sideUnknown","sideEmpty","sideAmbientLife","Side Relations","BIS_fnc_sideID"],"notes":[{"user":"Tankbuster","date":"2020-04-01T17:25:00Z","text":"When using this to get the side of vehicle drivers, be aware that when the boolean parameter is true, empty vehicles will return their driver as east.\nThe same vehicle, when the boolean parameter is false, will return \"UNKNOWN\""}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Sides","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}