{"name":"BIS_fnc_adjustSimpleObject","operator":null,"title":"BIS fnc adjustSimpleObject","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_adjustSimpleObject","revid":349493,"updated":"2023-11-08T17:09:09Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.62"}],"since":{"game":"arma3","name":"Arma 3","version":"1.62"},"arma3_since":"1.62","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Adjust simple object vertical position, animations and selection according to provided data.\n\nIn case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config.\n\n> [!IMPORTANT]\n> This function is automatically called by BIS_fnc_createSimpleObject.","syntaxes":[{"syntax":"[object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] call BIS_fnc_adjustSimpleObject","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"simple object that will be adjusted","types":["Object"],"since":null,"text":"object: Object - simple object that will be adjusted"},{"name":"class","type":"String","optional":true,"default":"\"\"","description":"asset `CfgVehicles` config class (**at least either *model* or *class* must be provided, ideally both**)","types":["String"],"since":null,"text":"class: String - (Optional, default \"\") asset `CfgVehicles` config class (**at least either *model* or *class* must be provided, ideally both**)"},{"name":"model","type":"String","optional":true,"default":"\"\"","description":"path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension \".p3d\"","types":["String"],"since":null,"text":"model: String - (Optional, default \"\") path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension \".p3d\""},{"name":"reversed","type":"Number","optional":true,"default":"0","description":"some objects, usually vehicles, are reveresed in p3d; valid values are:\n-  0: no change\n-  1: reverse\n- -1: unknown (behaves as 0)","types":["Number"],"since":null,"text":"reversed: Number - (Optional, default 0) some objects, usually vehicles, are reveresed in p3d; valid values are:\n-  0: no change\n-  1: reverse\n- -1: unknown (behaves as 0)"},{"name":"verticalOffset","type":"Array","optional":true,"default":"0","description":"fix for non-existant physX; usually needed only for vehicles","types":["Array"],"since":null,"text":"verticalOffset: Array - (Optional, default 0) fix for non-existant physX; usually needed only for vehicles"},{"name":"animationAdjustments","type":"Array","optional":true,"default":"`[]`","description":"animation that need to be animated to given state, in format [animationName, animationState]:\n- animationName: String - animation name\n- animationState: Number - animation state","types":["Array"],"since":null,"text":"animationAdjustments: Array - (Optional, default `[]`) animation that need to be animated to given state, in format [animationName, animationState]:\n- animationName: String - animation name\n- animationState: Number - animation state"},{"name":"selectionsToHide","type":"Array","optional":true,"default":"`[]`","description":"all listed selections will be hidden","types":["Array"],"since":null,"text":"selectionsToHide: Array - (Optional, default `[]`) all listed selections will be hidden"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"}}],"examples":[{"text":"```sqf\n[myCar, [\"B_MyCar_F\", \"path\\to\\file.p3d\"]] call BIS_fnc_adjustSimpleObject;\n```","code":["[myCar, [\"B_MyCar_F\", \"path\\to\\file.p3d\"]] call BIS_fnc_adjustSimpleObject;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["createSimpleObject","BIS_fnc_createSimpleObject","BIS_fnc_simpleObjectData"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Object Manipulation","Functions","Introduced with Arma 3 version 1.62"],"docblock":null,"filled_from_docblock":[]}