BIS fnc adjustSimpleObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
(Created page with "{{Function|= Comments ____________________________________________________________________________________________ | Arma 3 |= Game |1.62|= Game Version ____________________...")
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| Arma 3 |= Game


|1.00|= Game version
|1.62|= Game Version
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
|Adjust simple object vertical position, animations and selection according to provided data.<br><br>
Author: Jiri Wainar


Description:
Remarks:<br>
Adjust simple object vertical position, animations and selection according to provided data.
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:
| [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.


Parameter(s):
|p1= [[Object]]: Simple object that will be adjusted|= Parameter 1
0: OBJECT - simple object that will be adjusted
|p2= [[Array]]: Adjustment data in format:<br><br>
1: ARRAY - adjustment data
0: [[String]]: class - Asset CfgVehicles config class (default: ""; but at least either _model or _class must be provided, ideally both)<br>
  or
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>
  STRING - classname that is used to determine adjustment data
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>
3: [[Array]]: verticalOffset - Fix for non-existant physX; usually needed only for vehicles (default: 0)<br>
4: [[Array]]: animationAdjustments - Animation that need to be animated to given state (default: []); every element has this format: [_animationName:string,_animationState:scalar]<br>
5: [[Array]]: selectionsToHide - All listed selection will be hidden (default: [])<br>|= Parameter 2
____________________________________________________________________________________________


Returns:
| Nothing |= Return value
-


Example:
[_simpleObject:object(,_data:array/string)] call BIS_fnc_adjustSimpleObject;
See also:
* bis_fnc_createSimpleObject
* bis_fnc_replaceWithSimpleObject
* bis_fnc_simpleObjectData
* bis_fnc_exportCfgVehiclesSimpleObjectData
* bis_fnc_diagMacrosSimpleObjectData
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_adjustSimpleObject]]; --> |= Syntax
|x1= <code>[object, [class, model]] [[call]] '''BIS_fnc_adjustSimpleObject''';</code>|= EXAMPLE1
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________


|x1= <code></code> |=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- BEGIN Note Section -->
 
<!-- For example:
<!-- Note Section END -->
<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 -->
</dl>
</dl>


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

Revision as of 14:55, 14 September 2016

Hover & click on the images for description

Description

Description:
Adjust simple object vertical position, animations and selection according to provided data.

Remarks:
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:

0: String: class - Asset CfgVehicles config class (default: ""; but at least either _model or _class must be provided, ideally both)
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)
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)
3: Array: verticalOffset - Fix for non-existant physX; usually needed only for vehicles (default: 0)
4: Array: animationAdjustments - Animation that need to be animated to given state (default: []); every element has this format: [_animationName:string,_animationState:scalar]
5: Array: selectionsToHide - All listed selection will be hidden (default: [])
Return Value:
Nothing

Examples

Example 1:
[object, [class, model]] call BIS_fnc_adjustSimpleObject;

Additional Information

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