BIS fnc createSimpleObject: 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
Creates non-simulated framerate and network performance friendly object - a simple object - and applies different adjustments to fake non-existing physX and engine interactions. The adjustments need either to be stored in the object config or provided as the function input, otherwise they need to be done manually.


Simple objects cannot be destroyed and do not interact with the environment. They are usefull for creation low performance demanding static compositions (walls, rocks, wrecks, ...) and/or environments where shooting and collisions are not expected.
|p1=
 
[[String]] - Classname of the object; data are retrieved from the config definition.<br>
Parameter(s):
or<br>
0: STRING - classname of the object to be created. This is preffered way if the asset config definition contains the adjustment data or the data are not needed (most objects do not need adjustments).
[[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>
  ARRAY - creation data array; can be obtained by scanning the normal simulated object on scene with bis_fnc_simpleObjectData and then either added to the asset config or used straight away in the bis_fnc_createSimpleObject function.
[[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.
1: ARRAY - position; ASL coordinates if classname is known, World coordinates if using p3d only
|= Parameter 1
2: SCALAR - direction  (default: 0)
____________________________________________________________________________________________
3: BOOL - aligned to terrain (default: true); true: aligned to terrain, false: horizontal placement
4: BOOL - force super-simple object (default: false); true: super-simple object will be force, no type info or re-texturing is available, false: super-simple object is used unless re-texturing is possible
 
Returns:
OBJECT - a simple object or objNull if creation failed


Example:
|
_simpleObject:object = [_class:string,_position:array(,_direction:scalar,_aligned:bool)] call bis_fnc_createSimpleObject;
[[Array]] in format:<br>
_simpleObject:object = [_model:string,_position:array(,_direction:scalar,_aligned:bool)] call bis_fnc_createSimpleObject;
0: [[String]] - Class name from CfgVehicles<br>
_simpleObject:object = [_data:array,_position:array(,_direction:scalar,_aligned:bool)] call bis_fnc_createSimpleObject;
1: [[String]] - Model - Path to the vehicle p3d model<br>
2: [[Number]] - Reversed - Reverse value, to fix orientation<br>
3: [[Array]] - Vertical offset<br>
4: [[Array]] - Animation adjustments<br>
5: [[Array]] - Hidden selections<br>


See also:
{{note|Return values can be used in [[BIS_fnc_adjustSimpleObject]]}}|= Return value
* 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_createSimpleObject]]; --> |= 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:createSimpleObject}}]]
<!-- Appropriate categories go here -->
[[Category:Functions|{{uc:createSimpleObject}}]]
[[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:createSimpleObject}}]]

Revision as of 15:09, 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