createVehicle array: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (updated.)
Line 2: Line 2:
____________________________________________________________________________________________
____________________________________________________________________________________________


| ofp |= Game name
| arma |= Game name


|1.34|= Game version
|2.32|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| Create empty vehicle of given type.
| Creates a vehicle of the given type (type is the name of the subclass in [[CfgVehicles]]). If the markers array contains several marker names, the position of a random one is used. Otherwise, the given position is used. The vehicle is placed inside a circle with this position as center and placement as its radius. Special properties can be: "NONE", "FLY" and "FORM". |= Description
Pos is in format [[Position]].
See [[CfgVehicles]] for possible type values. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| type '''createVehicle''' pos |= Syntax
| '''createVehicle''' [type, position, markers, placement, special] |= Syntax


|p1= type: [[String]] |= Parameter 1
|p1= type: [[String]] |= Parameter 1


|p2= pos: [[Array]] |= Parameter 2
|p2= pos: [[Array]] |= Parameter 2
|p3= markers: [[Array]] |= Parameter 3
|p4= placement: [[Number]] |= Parameter 4
|p5= special: [[String]] |= Parameter 5


| [[Object]] |= Return value
| [[Object]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_tank <nowiki>=</nowiki> "M1Abrams" createVehicle [[getMarkerPos]] "tankFactory"</code> |= Example 1
|x1= <code>veh <nowiki>=</nowiki> createVehicle ["Cobra", [[position]] [[player]], [], 0, "FLY"</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 13:22, 13 August 2006

-wrong parameter ("Arma") defined!-2.32
Hover & click on the images for description

Description

Description:
Creates a vehicle of the given type (type is the name of the subclass in CfgVehicles). If the markers array contains several marker names, the position of a random one is used. Otherwise, the given position is used. The vehicle is placed inside a circle with this position as center and placement as its radius. Special properties can be: "NONE", "FLY" and "FORM".
Groups:
Uncategorised

Syntax

Syntax:
createVehicle [type, position, markers, placement, special]
Parameters:
type: String
pos: Array
markers: Array
placement: Number
special: String
Return Value:
Object

Examples

Example 1:
veh = createVehicle ["Cobra", position player, [], 0, "FLY"]

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