createSimpleObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(some info)
Line 2: Line 2:
|arma3|= Game name
|arma3|= Game name
|1.58|= Game version
|1.58|= Game version
| Creates object with given shape. The given object will not be simulated (no PhysX, sound nor an interesting target for AI) allowing the placement of decorative objects with a very little network traffic.<br><br>
|eff= global|= Effects in MP
Some of the model examples could be found here: [[createSimpleObject/objects]] |= Description
 
| Creates object with given shape defined as path to .p3d model. The object will not be simulated, i.e. no PhysX, no sounds, no interest for AI targeting. Such limitations allow to create global decorative objects with very little network traffic. Simple object cannot be destroyed.<br><br>
Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks 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
 
| '''createSimpleObject''' [shapeName, position]; |= Syntax
| '''createSimpleObject''' [shapeName, position]; |= Syntax
|p1= shapeName: [[String]] - Path to the 3d model |= Parameter 1
|p1= shapeName: [[String]] - Path to the 3d model (can be obtained with [[getModelInfo]] command) |= Parameter 1
|p2= position: [[Position]] - Where the shape will be created |= Parameter 2
|p2= position: [[Array]] - placement position in format [[PositionWorld]] |= Parameter 2
| [[Object]] - Created object |= RETURNVALUE  
| [[Object]] - Created simple object |= RETURNVALUE  
|x1= <code>decorativeTank = createSimpleObject ["\a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", position player];</code>|= EXAMPLE1  
 
|x1= <code>_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]]];</code>|= EXAMPLE1  
 
| [[hideSelection]], [[selectionPosition]], [[getModelInfo]], [[getObjectType]], [[cursorObject]], [[selectionNames]], [[animationNames]], [[createVehicle]], [[enableSimulation]], [[hideObject]] |= SEEALSO  
| [[hideSelection]], [[selectionPosition]], [[getModelInfo]], [[getObjectType]], [[cursorObject]], [[selectionNames]], [[animationNames]], [[createVehicle]], [[enableSimulation]], [[hideObject]] |= SEEALSO  
|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 21:58, 18 April 2016

Hover & click on the images for description

Description

Description:
Creates object with given shape defined as path to .p3d model. The object will not be simulated, i.e. no PhysX, no sounds, no interest for AI targeting. Such limitations allow to create global decorative objects with very little network traffic. Simple object cannot be destroyed.

Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks 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
Groups:
Uncategorised

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

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Bottom Section

Notes

Bottom Section