createUnit: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|C]]
[[Category:Scripting Commands|CREATEUNIT]]
[[Category:Scripting Commands OFP 1.97|C]]
[[Category:Scripting Commands OFP 1.97|CREATEUNIT]]
[[Category:Scripting Commands OFP 1.46|C]]
[[Category:Scripting Commands OFP 1.46|CREATEUNIT]]
[[Category:Scripting Commands ArmA|C]]
[[Category:Scripting Commands ArmA|CREATEUNIT]]





Revision as of 13:46, 4 May 2006


type creatUnit unitInfo


Operand types:

type: String

unitInfo: Array

Type of returned value:

Nothing

Compatibility:

Added in version 1.34

Description:

Create unit of given type.
Format of unitInfo is:

[pos (Position), group (Group),init (String), skill (Number), rank (String)]

Note: init, skill and rank are optional, default values are:

"", 0.5, "PRIVATE".

Note: The Group parameter MUST be an existing group or the unit won't be created.


Examples:

"soldierWB" createUnit [ getMarkerPos "barracks", groupAlpha]
"soldierWB" createUnit [ getMarkerPos "marker_1", groupAlpha, "loon1 = this ; this addWeapon {binocular}, 0.6, "corporal"]