Difference between revisions of "createSimpleObject"

From Bohemia Interactive Community
Jump to navigation Jump to search
(object properties/simulation)
(wikified links)
Line 4: Line 4:
 
|eff= global|= Effects in MP
 
|eff= global|= Effects in MP
  
| Creates object with given shape defined as path to .p3d model. Supported [[LOD]]'s include [https://community.bistudio.com/wiki/LOD#Geometry Geometry], [https://community.bistudio.com/wiki/LOD#Fire_Geometry Fire Geometry], [https://community.bistudio.com/wiki/LOD#Roadway Roadway], [https://community.bistudio.com/wiki/LOD#ViewGeometry View Geometry] , and [https://community.bistudio.com/wiki/LOD#ShadowVolume ShadowVolume]. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI collision/pathfinding, and built in lights.<br><br>
+
| Create object with given shape defined as path to .p3d model. Supported [[LOD]]s include [[LOD#Geometry|Geometry]], [[LOD#Fire_Geometry|Fire Geometry]], [[LOD#Roadway|Roadway]], [[LOD#ViewGeometry|View Geometry]] and [[LOD#ShadowVolume|ShadowVolume]]. Supported features include collision, texturing, animation, penetration, AI spotting occlusion and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI collision/pathfinding and built in lights.<br><br>
  
 
Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: [[createSimpleObject/objects]] |= Description
 
Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: [[createSimpleObject/objects]] |= Description

Revision as of 02:14, 29 April 2016

Introduced with Arma 3 version 1.581.58Effects of this scripting command are broadcasted over the network and happen on every computer in the network
Hover & click on the images for descriptions

Description

Description:
Create object with given shape defined as path to .p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI collision/pathfinding and built in lights.

Given the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally. Some of the model examples could be found here: createSimpleObject/objects

Syntax

Syntax:
createSimpleObject [shapeName, position];
Parameters:
shapeName: String - Path to the 3d model (can be obtained with getModelInfo command)
position: Array - placement position in format PositionWorld
Return Value:
Object - Created simple object

Examples

Example 1:
_pos = player getRelPos [10, 0]; _tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos]; _tank setPos (_pos vectorAdd (getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0]))); _tank hideSelection ["zasleh", true]; _tank hideSelection ["zasleh2", true]; _tank hideSelection ["clan", true]; _tank animate ["Wheel_podkoloL3", 1, true]; _tank animate ["Wheel_podkoloL6", 1, true];

Additional Information

See also:
hideSelectionselectionPositiongetModelInfogetObjectTypecursorObjectselectionNamesanimationNamescreateVehicleenableSimulationhideObject
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Bottom Section

Notes

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/