BIS fnc simpleObjectData: 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>/*
|Get complete data needed for simple object creation.|= Description
Author: Jiri Wainar
____________________________________________________________________________________________


Description:
| [classname] [[call]] '''BIS_fnc_simpleObjectData''' |= Syntax
Get complete data needed for simple object creation.


Parameter(s):
|p1=
0: STRING - classname of the object; data are retrieved from the config definition.
[[String]] - Classname of the object; data are retrieved from the config definition.<br>
  or
or<br>
  OBJECT - existing object or simple object that will be scanned; if it is a simple object '_reversed' attribute cannot be retrieved
[[Object]] - Existing object or simple object that will be scanned; if it is a simple object '_reversed' attribute cannot be retrieved<br>
  or
or<br>
  STRING - path to the p3d; verifies and fixes model path format and returns it in an array (index 1). It has very limited functionality in this mode as no data can actually be retrieved from model path.
[[String]] - Path to the p3d; verifies and fixes model path format and returns it in an array (index 1). It has very limited functionality in this mode as no data can actually be retrieved from model path.
 
|= Parameter 1
Returns:
____________________________________________________________________________________________
  0: _class:string - asset CfgVehicles config class (default: "")
  1: _model:string - path to the vehicle p3d model; needs to start without backslash and must end with the proper file extension ".p3d" (default: "")
  2: _reversed:scalar - some objects, usually vehicles, are reveresed in p3d (default: 0); valid values are 0: no change, 1: reverse, -1: unknown (behaves as 0)
  3: _verticalOffset:scalar - fix for non-existant physX; usually needed only for vehicles (default: 0)
  4: _animationsAdjustments:array - animation that need to be animated to given state (default: []); every element has this format: [_animationName:string,_animationState:scalar]
  5: _selectionsToHide:array - all listed selection will be hidden (default: [])
  6: _verticalOffsetWorld:scalar - vertical offset in World coordinates; similar to ASL but refers to object [0,0,0], not its land contacts
  7. _textures:array - textures applied to object
 
Example:
_data:array = [_vehicle:object] call BIS_fnc_simpleObjectData;
_data:array = [_class:string] call BIS_fnc_simpleObjectData;


See also:
|
* bis_fnc_createSimpleObject
[[Array]] in format:<br>
* bis_fnc_replaceWithSimpleObject
0: [[String]] - Class name from CfgVehicles<br>
* bis_fnc_simpleObjectData
1: [[String]] - Model - Path to the vehicle p3d model<br>
* bis_fnc_exportCfgVehiclesSimpleObjectData
2: [[Number]] - Reversed - Reverse value, to fix orientation<br>
* bis_fnc_diagMacrosSimpleObjectData
3: [[Array]]  - Vertical offset<br>
*/
4: [[Array]] - Animation adjustments<br>
5: [[Array]] - Hidden selections<br>


#define SELECTIONS_TO_HIDE ["fireanim","brakelights","clan","dashboard","showdamage","damage","backlights","offlight","redlight","whitelight","hrotorstill","hrotormove","vrotorstill","vrotormove","rotorstill","rotormove"]
{{note|Return values can be used in [[BIS_fnc_adjustSimpleObject]]}}|= Return value
#define RETURN_VALUES [_class,_model,_reversed,_verticalOffset,_animationsAdjustments,_selectionsToHide,_verticalOffsetWorld,_textures]
#define ROUND_DECIMALS(input,accuracy) round((1/accuracy)*(input))*accuracy;


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_simpleObjectData]]; --> |= Syntax
|x1= <code>["B_Boat_Armed_01_minigun_F"] [[call]] '''BIS_fnc_simpleObjectData''';</code>|= EXAMPLE1
|p1= |= Parameter 1
|x2= <code>[BIS_boat] [[call]] '''BIS_fnc_simpleObjectData''';</code>|= EXAMPLE2
 
| |= Return value
____________________________________________________________________________________________


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


| |= See also
| [[createSimpleObject]], [[BIS_fnc_adjustSimpleObject]], [[BIS_fnc_createSimpleObject]]|= 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:simpleObjectData}}]]
<!-- Appropriate categories go here -->
[[Category:Functions|{{uc:simpleObjectData}}]]
[[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:simpleObjectData}}]]

Revision as of 19:10, 14 September 2016

Hover & click on the images for description

Description

Description:
Get complete data needed for simple object creation.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[classname] call BIS_fnc_simpleObjectData
Parameters:
String - Classname of the object; data are retrieved from the config definition.
or
Object - Existing object or simple object that will be scanned; if it is a simple object '_reversed' attribute cannot be retrieved
or
String - Path to the p3d; verifies and fixes model path format and returns it in an array (index 1). It has very limited functionality in this mode as no data can actually be retrieved from model path.
Return Value:
Array in format:
0: String - Class name from CfgVehicles
1: String - Model - Path to the vehicle p3d model
2: Number - Reversed - Reverse value, to fix orientation
3: Array - Vertical offset
4: Array - Animation adjustments
5: Array - Hidden selections
Template:note

Examples

Example 1:
["B_Boat_Armed_01_minigun_F"] call BIS_fnc_simpleObjectData;
Example 2:
[BIS_boat] call BIS_fnc_simpleObjectData;

Additional Information

See also:
createSimpleObjectBIS_fnc_adjustSimpleObjectBIS_fnc_createSimpleObject

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