BIS fnc createSimpleObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported: BIS Functions update 2/7)
m (Fix category and description)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


|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.<br><br>
| 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.<br>
 
<br>
Simple objects cannot be destroyed and do not interact with the environment. They are usefull for creation low performance demanding static compositions (walls, rocks, wrecks, ...) and/or environments where shooting and collisions are not expected.|= Description
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. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| [class] [[call]] '''BIS_fnc_createSimpleObject''' |= Syntax
| [parameter] [[call]] '''BIS_fnc_createSimpleObject''' |= Syntax


|p1=
|p1= parameter: [[String]] or [[Array]]:
[[String]]: Classname of the object to be created. This is preffered way if the asset config definition contains the adjustment data or the data are not needed (most objects do not need adjustments).<br>
* [[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).
or<br>
* [[Array]]: adjustment data in format [class, model, reversed, verticalOffset, animationAdjustments, selectionsToHide]:
|p2= [[Array]]: Adjustment data in format:<br><br>
** class: [[String]] - (default "") asset CfgVehicles config class ('''at least either ''model'' or ''class'' must be provided, ideally both''')
0: [[String]]: class - Asset CfgVehicles config class (default: ""; but at least either _model or _class must be provided, ideally both)<br>
** model: [[String]] - (default "") Path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d"
1: [[String]]: model - Path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d" (default: ""; but at least either _model or _class must be provided, ideally both)<br>
** reversed: [[Number]] - (default 0) some objects, usually vehicles, are reveresed in p3d; valid values are:
2: [[Number]]: reversed - Some objects, usually vehicles, are reveresed in p3d (default: 0); valid values are 0: no change, 1: reverse, -1: unknown (behaves as 0)<br>
*** &nbsp;0: no change
3: [[Array]]: verticalOffset - Fix for non-existant physX; usually needed only for vehicles (default: 0)<br>
*** &nbsp;1: reverse
4: [[Array]]: animationAdjustments - Animation that need to be animated to given state (default: []); every element has this format: [_animationName:string,_animationState:scalar]<br>
*** -1: unknown (behaves as 0)
5: [[Array]]: selectionsToHide - All listed selection will be hidden (default: [])<br>|= Parameter 2
** 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 |= Parameter 1
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[Object]] or [[objNull]]|= Return value
| [[Object]] |= Return value
 
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>["B_Boat_Armed_01_minigun_F"] [[call]] '''BIS_fnc_createSimpleObject''';</code>|= EXAMPLE1
|x1= <code>["B_Boat_Armed_01_minigun_F"] [[call]] [[BIS_fnc_createSimpleObject]];</code>|= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[BIS_fnc_adjustSimpleObject]], [[BIS_fnc_createSimpleObject]], [[BIS_fnc_replaceWithSimpleObject]], [[BIS_fnc_simpleObjectData]]|= See Also
|[[BIS_fnc_adjustSimpleObject]], [[BIS_fnc_replaceWithSimpleObject]], [[BIS_fnc_simpleObjectData]] |= See Also


}}
}}
Line 39: Line 42:
<dl class="command_description">
<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- BEGIN Note Section -->
<!-- For example:
 
<dd class="notedate">Posted on Month Day, Year - Time (UTC)</dd>
<dt class="note">'''[[User:User Name|User Name]]'''</dt>
<dd class="note">This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] "Leave it here for others to read"; };</code></dd>
-->
<!-- END Note Section -->
<!-- END Note Section -->
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here -->
[[Category:Arma 3: Functions|{{uc:createSimpleObject}}]]
[[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]]

Revision as of 18:01, 21 April 2018

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