createVehicle array: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|CREATEVEHICLEARRAY]]
{{Command|= Comments
[[Category:Scripting Commands ArmA|CREATEVEHICLEARRAY]]
____________________________________________________________________________________________


| ofp |= Game name


<h2 style="color:#000066">''' createVehicle ''[type, position, markers, placement, special]'''''</h2>
|1.34|= Game version
____________________________________________________________________________________________


| Create empty vehicle of given type.
Pos is in format [[Position]].
See [[CfgVehicles]] for possible type values. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| type '''createVehicle''' pos |= Syntax


'''[type, position, markers, placement, special]:''' [[Array]]
|p1= type: [[String]] |= Parameter 1


'''Type of returned value:'''
|p2= pos: [[Array]] |= Parameter 2


[[Object]]
| [[Object]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>_tank = "M1Abrams" createVehicle [[getMarkerPos]] "tankFactory"</pre> |= Example 1
____________________________________________________________________________________________


'''Compatibility:'''
|  |= See also


Version 2.32 required.
}}


'''Description:'''
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


Creates a vehicle of the given '''type''' (type is the name of the subclass in CfgVehicles).
<!-- Note Section END -->
</dl>


If the '''markers''' array contains several marker names, the position of a random one is used, otherwise, the given '''position''' is used.
<h3 style="display:none">Bottom Section</h3>


The vehicle is placed inside a circle with this position as center and '''placement''' as its radius.
[[Category:Scripting Commands|CREATEVEHICLEARRAY]]
 
[[Category:Scripting Commands ArmA|CREATEVEHICLEARRAY]]
'''Special''' properties can be: "NONE", "FLY" and "FORM".
 
 
'''Example:'''
 
veh = '''createVehicle''' ["Cobra", [[position]] [[player]], [], 0, "FLY"]

Revision as of 23:10, 1 August 2006

Hover & click on the images for description

Description

Description:
Create empty vehicle of given type. Pos is in format Position. See CfgVehicles for possible type values.
Groups:
Uncategorised

Syntax

Syntax:
type createVehicle pos
Parameters:
type: String
pos: Array
Return Value:
Object

Examples

Example 1:
_tank = "M1Abrams" createVehicle [[getMarkerPos]] "tankFactory"

Additional Information

See also:
See also needed

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

Notes

Bottom Section