BIS fnc adjustSimpleObject: 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, description, example and see also)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


|Adjust simple object vertical position, animations and selection according to provided data.<br><br>
|Adjust simple object vertical position, animations and selection according to provided data.<br>
'''NOTE:''' function is automatically called by [[BIS_fnc_createSimpleObject]].
In case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config. |= Description
____________________________________________________________________________________________


Remarks:<br>
| [object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] [[call]] [[BIS_fnc_adjustSimpleObject]] |= Syntax
Function is automatically called by [[BIS_fnc_createSimpleObject]]. In case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config.
|= Description
____________________________________________________________________________________________


| [object,[class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] [[call]] '''BIS_fnc_adjustSimpleObject''' |= Syntax
|p1= [[Object]]: Simple object that will be adjusted |= Parameter 1


|p1= [[Object]]: Simple object that will be adjusted|= Parameter 1
|p2= [[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 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| Nothing |= Return value
| [[Nothing]] |= Return value
 
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[object, [class, model]] [[call]] '''BIS_fnc_adjustSimpleObject''';</code>|= EXAMPLE1
|x1= <code>[myCar, ["B_MyCar_F", "path\to\file.p3d"]] [[call]] [[BIS_fnc_adjustSimpleObject]];</code>|= Example 1


____________________________________________________________________________________________
____________________________________________________________________________________________


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


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

Revision as of 17:50, 21 April 2018

Hover & click on the images for description

Description

Description:
Adjust simple object vertical position, animations and selection according to provided data.
NOTE: function is automatically called by BIS_fnc_createSimpleObject. In case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] call BIS_fnc_adjustSimpleObject
Parameters:
Object: Simple object that will be adjusted
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:
Nothing

Examples

Example 1:
[myCar, ["B_MyCar_F", "path\to\file.p3d"]] call BIS_fnc_adjustSimpleObject;

Additional Information

See also:
createSimpleObjectBIS_fnc_createSimpleObjectBIS_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