BIS_fnc_createSimpleObject

From Bohemia Interactive Community
Revision as of 19:01, 21 April 2018 by Lou Montana (talk | contribs) (Fix category and description)
Jump to navigation Jump to search
Hover & click on the images for description

Description

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.

Simple 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.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[parameter] call BIS_fnc_createSimpleObject
Parameters:
parameter: String or Array:
  • 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).
  • Array: adjustment data in format [class, model, reversed, verticalOffset, animationAdjustments, selectionsToHide]:
    • class: String - (default "") asset CfgVehicles config class (at least either model or class must be provided, ideally both)
    • model: String - (default "") Path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d"
    • reversed: Number - (default 0) some objects, usually vehicles, are reveresed in p3d; valid values are:
      •  0: no change
      •  1: reverse
      • -1: unknown (behaves as 0)
    • verticalOffset: Array - (Optional, default 0) fix for non-existant physX; usually needed only for vehicles
    • animationAdjustments: Array - (Optional, default []) Animation that need to be animated to given state, in format [animationName, animationState]:
      • animationName: String - animation name
      • animationState: Number - animation state
    • selectionsToHide: Array - (Optional, default []) all listed selections will be hidden
Return Value:
Object

Examples

Example 1:
["B_Boat_Armed_01_minigun_F"] call BIS_fnc_createSimpleObject;

Additional Information

See also:
BIS_fnc_adjustSimpleObjectBIS_fnc_replaceWithSimpleObjectBIS_fnc_simpleObjectData

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