{"name":"BIS_fnc_createSimpleObject","operator":null,"title":"BIS fnc createSimpleObject","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_createSimpleObject","revid":352418,"updated":"2024-02-09T15:26:08Z","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":"Creates non-simulated framerate and network performance friendly object - a Simple Object - and applies different adjustments to fake non-existing physX and engine interactions. The adjustments need either to be stored in the object config or provided as the function input, otherwise they need to be done manually.\n\nSimple objects cannot be destroyed and do not interact with the environment. They are useful for creating low performance-demanding static compositions (walls, rocks, wrecks, …) and/or environments where shooting and collisions are not expected.","syntaxes":[{"syntax":"[input, position, direction, followTerrain, forceSuperSimpleObject, local] call BIS_fnc_createSimpleObject","since":null,"effect":null,"exec":null,"params":[{"name":"input","type":"String or Array:","optional":true,"default":"\"\"","description":"String or Array:\n- String: classname of the object to be created. This is the preferred way if the asset config definition contains the adjustment data or the data are not needed (most objects do not need adjustments).\n- Array: adjustment data in format [class, model, reversed, verticalOffset, animationAdjustments, selectionsToHide]:\n  - class: String -  asset CfgVehicles config class (**at least either *model* or *class* must be provided, ideally both**)\n  - model: String - (Optional, default \"\") Path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension \".p3d\"\n  - reversed: Number - (Optional, default 0) some objects, usually vehicles, are reversed in p3d; valid values are:\n    - 1: reverse\n    - 0: no change - any value other than 1 will result in no change\n  - verticalOffset: Number - (Optional, default 0) fix for non-existant physX; usually needed only for vehicles\n  - 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\n  - selectionsToHide: Array - (Optional, default `[]`) all listed selections will be hidden","types":["String","Array"],"since":null,"text":"input: String or Array:\n- String: classname of the object to be created. This is the preferred way if the asset config definition contains the adjustment data or the data are not needed (most objects do not need adjustments).\n- Array: adjustment data in format [class, model, reversed, verticalOffset, animationAdjustments, selectionsToHide]:\n  - class: String - (Optional, default \"\") asset CfgVehicles config class (**at least either *model* or *class* must be provided, ideally both**)\n  - model: String - (Optional, default \"\") Path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension \".p3d\"\n  - reversed: Number - (Optional, default 0) some objects, usually vehicles, are reversed in p3d; valid values are:\n    - 1: reverse\n    - 0: no change - any value other than 1 will result in no change\n  - verticalOffset: Number - (Optional, default 0) fix for non-existant physX; usually needed only for vehicles\n  - 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\n  - selectionsToHide: Array - (Optional, default `[]`) all listed selections will be hidden"},{"name":"position","type":"Array format PositionASL","optional":false,"default":null,"description":"the object will be placed by the **model centre**'s position (see getPosWorld)","types":["Array","PositionASL"],"since":null,"text":"position: Array format PositionASL - the object will be placed by the **model centre**'s position (see getPosWorld)"},{"name":"direction","type":"Number","optional":true,"default":"0","description":null,"types":["Number"],"since":null,"text":"direction: Number - (Optional, default 0)"},{"name":"followTerrain","type":"Boolean","optional":true,"default":"true","description":"true to follow terrain inclination, false to be horizontally aligned","types":["Boolean"],"since":null,"text":"followTerrain: Boolean - (Optional, default true) true to follow terrain inclination, false to be horizontally aligned"},{"name":"forceSuperSimpleObject","type":"Boolean","optional":true,"default":"false","description":"true to create a **Super Simple Object** from p3d path (that **must** be provided)","types":["Boolean"],"since":null,"text":"forceSuperSimpleObject: Boolean - (Optional, default false) true to create a **Super Simple Object** from p3d path (that **must** be provided)"},{"name":"local","type":"Boolean","optional":true,"default":"false","description":"true to create local instance of the object","types":["Boolean"],"since":"arma3 2.08","text":"local: Boolean - (Optional, default false) true to create local instance of the object"}],"returns":{"type":"Object","types":["Object"],"description":"the created Simple Object, objNull if creation failed","text":"Object - the created Simple Object, objNull if creation failed"}}],"examples":[{"text":"```sqf\n[\"B_Boat_Armed_01_minigun_F\", getPosWorld player, getDir player] call BIS_fnc_createSimpleObject;\n```","code":["[\"B_Boat_Armed_01_minigun_F\", getPosWorld player, getDir player] call BIS_fnc_createSimpleObject;"]},{"text":"```sqf\n[\"B_Boat_Armed_01_minigun_F\", player modelToWorldWorld [0,5,0], getDir player + 90, false, false] call BIS_fnc_createSimpleObject;\n```","code":["[\"B_Boat_Armed_01_minigun_F\", player modelToWorldWorld [0,5,0], getDir player + 90, false, false] call BIS_fnc_createSimpleObject;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Simple Objects","createSimpleObject","BIS_fnc_adjustSimpleObject","BIS_fnc_replaceWithSimpleObject","BIS_fnc_simpleObjectData","getPosWorld","setPosWorld"],"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":[]}