Difference between revisions of "createSimpleObject"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Update version for local variant)
(see also)
Line 55: Line 55:
_tank [[animate]] ["Wheel_podkoloL6", 0.5, [[true]]];</code>|EXAMPLE2=  
_tank [[animate]] ["Wheel_podkoloL6", 0.5, [[true]]];</code>|EXAMPLE2=  
| [[isSimpleObject]], [[hideSelection]], [[selectionPosition]], [[getModelInfo]], [[getObjectType]], [[cursorObject]], [[selectionNames]], [[animationNames]], [[createVehicle]], [[enableSimulation]], [[hideObject]], [[Arma_3_Simple_Objects|Simple Objects Guide]] |SEEALSO=  
| [[isSimpleObject]], [[hideSelection]], [[selectionPosition]], [[getModelInfo]], [[getObjectType]], [[cursorObject]], [[selectionNames]], [[animationNames]], [[createVehicle]], [[enableSimulation]], [[hideObject]], [[getMissionPath]], [[Arma_3_Simple_Objects|Simple Objects Guide]] |SEEALSO=  

Revision as of 19:42, 3 August 2019


Bottom Section


Bottom Section

Posted on April 18, 2016 - 20:03 (UTC)
Killzone Kid
The easiest way to correctly place simple object is to create normal object of the same shape from class (if possible), then copy getPosWorld, vectorDir and vectorUp from it. Then create the simple object and apply copied values to it, this will position simple object exactly as normal object was positioned: _heli = "B_Heli_Light_01_F" createVehicleLocal (player getRelPos [10, 0]); _position = getPosWorld _heli; _vectorDirUp = [vectorDir _heli, vectorUp _heli]; _model = getModelInfo _heli select 1; deleteVehicle _heli; _simpleHeli = createSimpleObject [_model, _position]; _simpleHeli setVectorDirAndUp _vectorDirUp;
Posted on April 28, 2016 - 18:10 (UTC)
Waffle SS.
Models from within the mission file/folder can be created, but full system path is needed. Use: (str missionConfigFile select [0, count str missionConfigFile - 15]) + "myModel.p3d" //mission folder path code from: http://killzonekid.com/arma-scripting-tutorials-mission-root/
Posted on May 11, 2016 - 01:28 (UTC)
Waffle SS.
simulationEnabled returns false.
Posted on September 5, 2016 - 15:10 (UTC)
There is a section in function library dedicated to simple object creation and interaction. It's purpose is to simplify the operations:
  • BIS_fnc_createSimpleObject
    • creates simple object according to the supplied data
    • you can supply p3d path, class name or data you get from scanning a non-simple object
  • BIS_fnc_simpleObjectData
    • gathers and returns data about the non-simple object
    • data can be then used to create simple object
  • BIS_fnc_replaceWithSimpleObject
    • replaces non-simple object with simple object on the scene
    • do not use it in large scale in MP missions as it is not network efficient
  • BIS_fnc_adjustSimpleObject
    • adjusts simple object to looks as close to the non-simple object as possible
    • function is internally called from the 'bis_fnc_createSimpleObject', you won't probably need to call this function directly
Check the function headers for more info about the input parameters and possibilities.