createGroup: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \{\{GameCategory\|[a-z]+[0-9]?\|Scripting Commands\}\}" to "") |
Lou Montana (talk | contribs) (Add OFP 63 groups limit) |
||
Line 23: | Line 23: | ||
|eff= global | |eff= global | ||
|descr= Creates a new [[Group]] for the given [[Side]]. | |descr= Creates a new [[Group]] for the given [[Side]]. Using this command while the group limit is reached will return [[grpNull]]. | ||
{{{!}} class="wikitable" style="text-align: center" | |||
! Game | |||
{{!}} {{GVI|ofp|1.00}} | |||
{{!}} {{GVI|ofpe|1.00}} | |||
{{!}} {{GVI|arma1|1.00}} | |||
{{!}} {{GVI|arma2|1.00}} | |||
{{!}} {{GVI|arma2|1.50}} | |||
{{!}} {{GVI|tkoh|1.00}} | |||
{{!}} {{GVI|arma3|1.00}} | |||
{{!}} {{GVI|arma3|1.68}} | |||
{{!}}- | |||
! Max. Nb. of Groups | |||
{{!}} 63 | |||
{{!}} colspan="6" {{!}} 144 | |||
{{!}} 288 | |||
{{!}}} | |||
{{Feature | important | | {{Feature | important | | ||
* Groups can only be created for the [[west]]/[[blufor]], [[opfor]]/[[east]], [[independent]]/[[resistance]], [[civilian]] and [[sideLogic]] sides | * Groups can only be created for the [[west]]/[[blufor]], [[opfor]]/[[east]], [[independent]]/[[resistance]], [[civilian]] and [[sideLogic]] sides - any other side will return [[grpNull]]. | ||
* Before {{arma3}} a [[Side]] [[createCenter|center]] must exist before group creation (either by having editor-placed units or [[createCenter]] usage). | * Before {{arma3}} a [[Side]] [[createCenter|center]] must exist before group creation (either by having editor-placed units or [[createCenter]] usage). | ||
}} | }} | ||
{{Feature|arma3 | | {{Feature|arma3| | ||
* [[createCenter]] usage is not needed anymore as all centers are automatically created. | |||
* When the last unit leaves its group, the group usually gets immediately auto-deleted, regardless of its auto-deletion setting. | * When the last unit leaves its group, the group usually gets immediately auto-deleted, regardless of its auto-deletion setting. | ||
}} | }} | ||
|s1= | |s1= [[createGroup]] side | ||
|p1= side: [[Side]] | |p1= side: [[Side]] | ||
|r1= [[Group]] | |r1= [[Group]] - [[grpNull]] if the group limit is reached | ||
|s2= [[createGroup]] [side, deleteWhenEmpty] {{Since|arma3|1. | |s2= [[createGroup]] [side, deleteWhenEmpty] {{Since|arma3|1.68|y}} | ||
|p21= | |p21= side: [[Side]] | ||
|p22 | |p22= deleteWhenEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to [[deleteGroupWhenEmpty|delete the group when empty]]. | ||
* If set to [[true]], forces a group to get deleted when empty - it does '''not''' prevent its deletion by other commands when set to [[false]]. | |||
* If set to [[true]], | |||
* Deletion may take up to a minute after the last unit is removed. | * Deletion may take up to a minute after the last unit is removed. | ||
|r2= [[Group]] | |r2= [[Group]] - [[grpNull]] if the group limit is reached | ||
|x1= <code>[[private]] _group = [[createGroup]] [[east]];</code> | |x1= <code>[[private]] _group = [[createGroup]] [[east]];</code> |
Revision as of 11:36, 17 June 2021
Description
- Description:
- Creates a new Group for the given Side. Using this command while the group limit is reached will return grpNull.
Game 1.00 1.00 1.00 1.00 1.50 1.00 1.00 1.68 Max. Nb. of Groups 63 144 288 - Groups:
- Groups
Syntax
- Syntax:
- createGroup side
- Parameters:
- side: Side
- Return Value:
- Group - grpNull if the group limit is reached
Alternative Syntax
- Syntax:
- createGroup [side, deleteWhenEmpty] Template:Since
- Parameters:
- side: Side
- deleteWhenEmpty: Boolean - (Optional, default false) true to delete the group when empty.
- Return Value:
- Group - grpNull if the group limit is reached
Examples
- Example 1:
private _group = createGroup east;
- Example 2:
private _group = createGroup [east, true];
Additional Information
- See also:
- deleteGroupdeleteGroupWhenEmptyisGroupDeletedWhenEmptygroupsetGroupIdgroupIDunitsgroupFromNetIdnetIdleaderselectLeaderjoincreateCentercreateUnitcreateVehicleSide
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
- Posted on July 10, 2007
- 5133p39
- In Armed Assault, empty groups are not automatically deleted - if you created 144 groups, you will not be able to create new group even if all units in all those groups died, because all the 144 groups still exists - you will have to delete some groups manually.
- Posted on January 04, 2011
- kju
- A group created with createGroup will get a waypoint at [0,0,0]. When you use createUnit to fill it with units, it will get an additional waypoint at the position the first unit is created. This new waypoint will also be set as currentWaypoint. However keep these two waypoints in mind when you do some scripting involving this groups' waypoints.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Groups
- Scripting Commands: Global Effect