createUnit array: Difference between revisions
Jump to navigation
Jump to search
m (fixed desc, sort of fixed example.) |
mNo edit summary |
||
Line 8: | Line 8: | ||
| Create unit of given type. | | Create unit of given type. | ||
Format of unitInfo is: [pos ([[Position]]), group ([[Group]]),init ([[Code]]), skill ([[Number]]), rank ([[String]])] | Format of unitInfo is: [pos ([[Position]]), group ([[Group]]),init ([[Code]]), skill ([[Number]]), rank ([[String]])] | ||
Line 23: | Line 24: | ||
| [[Nothing]] |= Return value | | [[Nothing]] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1 = <code> "soldierWB" createUnit [ [[getMarkerPos]] "barracks", groupAlpha] | |x1 = <code>"soldierWB" '''createUnit''' [ [[getMarkerPos]] "barracks", groupAlpha] | ||
"soldierWB" createUnit [ [[getMarkerPos]] "marker_1", groupAlpha, {loon1 <nowiki>=</nowiki> this ; this [[addWeapon]] "binocular"}, 0.6, "corporal"] </code> | "soldierWB" '''createUnit''' [ [[getMarkerPos]] "marker_1", groupAlpha,<br /> {loon1 <nowiki>=</nowiki> this ; this [[addWeapon]] "binocular"}, 0.6, "corporal"] </code> | ||
| |= See also | | |= See also | ||
Revision as of 13:28, 7 August 2006
Description
- Description:
- Create unit of given type. Format of unitInfo is: [pos (Position), group (Group),init (Code), 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.
- Groups:
- Uncategorised
Syntax
- Syntax:
- Syntax needed
- Parameters:
- type: String
- unitInfo: Array
- Return Value:
- type createUnit unitInfo
Examples
- Example 1:
"soldierWB" createUnit [ getMarkerPos "barracks", groupAlpha] "soldierWB" createUnit [ getMarkerPos "marker_1", groupAlpha,
{loon1 = this ; this addWeapon "binocular"}, 0.6, "corporal"]
Additional Information
- See also:
- Nothing
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