BIS fnc adjustSimpleObject: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "(Optional, default {{hl|[]}})" to "(Optional, default <sqf inline>[]</sqf>)") |
||
(5 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|descr=Adjust simple object vertical position, animations and selection according to provided data.<br> | |descr=Adjust simple object vertical position, animations and selection according to provided data.<br> | ||
In case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config. | In case both adjustment data and class are being used, data has higher priority and only undefined parts are filled from config. | ||
{{Feature|important|This function is automatically called by [[BIS_fnc_createSimpleObject]].}} | |||
|s1= [object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] call [[BIS_fnc_adjustSimpleObject]] | |s1= [object, [class, model, reversed, verticalOffset, animAdjustments, selectionToHide]] call [[BIS_fnc_adjustSimpleObject]] | ||
Line 14: | Line 15: | ||
|p1= object: [[Object]] - simple object that will be adjusted | |p1= object: [[Object]] - simple object that will be adjusted | ||
|p2= | |p2= class: [[String]] - (Optional, default "") asset {{hl|CfgVehicles}} config class ('''at least either ''model'' or ''class'' must be provided, ideally both''') | ||
|p3= model: [[String]] - (Optional, default "") path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d" | |||
|p4= reversed: [[Number]] - (Optional, default 0) some objects, usually vehicles, are reveresed in p3d; valid values are: | |||
* 0: no change | |||
* 1: reverse | |||
* -1: unknown (behaves as 0) | |||
|p5= verticalOffset: [[Array]] - (Optional, default 0) fix for non-existant physX; usually needed only for vehicles | |||
|p6= animationAdjustments: [[Array]] - (Optional, default <sqf inline>[]</sqf>) animation that need to be animated to given state, in format [animationName, animationState]: | |||
* animationName: [[String]] - animation name | |||
* animationState: [[Number]] - animation state | |||
|p7= selectionsToHide: [[Array]] - (Optional, default <sqf inline>[]</sqf>) all listed selections will be hidden | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>[myCar, ["B_MyCar_F", "path\to\file.p3d"]] call BIS_fnc_adjustSimpleObject;</sqf> | ||
|seealso= [[createSimpleObject]] [[BIS_fnc_createSimpleObject]] [[BIS_fnc_simpleObjectData]] | |seealso= [[createSimpleObject]] [[BIS_fnc_createSimpleObject]] [[BIS_fnc_simpleObjectData]] | ||
}} | }} |
Latest revision as of 18:09, 8 November 2023
Description
- Description:
- Adjust simple object vertical position, animations and selection according to provided data.
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: String - (Optional, default "") asset CfgVehicles config class (at least either model or class must be provided, ideally both)
- model: String - (Optional, default "") path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d"
- reversed: Number - (Optional, 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]:
- selectionsToHide: Array - (Optional, default []) all listed selections will be hidden
- Return Value:
- Nothing
Examples
- Example 1:
Additional Information
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