BIS fnc adjustSimpleObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| Arma 3 |Game=
| Arma 3 |Game=


|1.62|Game Version=
|1.62


|gr1 = Object Manipulation |GROUP1=
|gr1 = Object Manipulation


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


| [object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] [[call]] [[BIS_fnc_adjustSimpleObject]] |SYNTAX=
| [object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] [[call]] [[BIS_fnc_adjustSimpleObject]]


|p1= object: [[Object]] - simple object that will be adjusted |PARAMETER1=
|p1= object: [[Object]] - simple object that will be adjusted


|p2= [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]: [[Array]] - adjustment data:
|p2= [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]: [[Array]] - adjustment data:
Line 26: Line 26:
** animationName: [[String]] - animation name
** animationName: [[String]] - animation name
** animationState: [[Number]] - animation state
** animationState: [[Number]] - animation state
* selectionsToHide: [[Array]] - (Optional, default []) all listed selections will be hidden |PARAMETER2=
* selectionsToHide: [[Array]] - (Optional, default []) all listed selections will be hidden


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]


|x1= <code>[myCar, ["B_MyCar_F", "path\to\file.p3d"]] [[call]] [[BIS_fnc_adjustSimpleObject]];</code>|EXAMPLE1=
|x1= <code>[myCar, ["B_MyCar_F", "path\to\file.p3d"]] [[call]] [[BIS_fnc_adjustSimpleObject]];</code>




| [[createSimpleObject]], [[BIS_fnc_createSimpleObject]], [[BIS_fnc_simpleObjectData]] |SEEALSO=
| [[createSimpleObject]], [[BIS_fnc_createSimpleObject]], [[BIS_fnc_simpleObjectData]]


}}
}}

Revision as of 23:39, 17 January 2021

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:
Object Manipulation

Syntax

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