Groups
50 scripting commands. Also as Markdown for agents.
- allGroupsReturn a list of all groups created on the following sides east, west, resistance/independent and civilian only. Does not contain groups of sideLogic.
- allowFleeingSets the cowardice level (the lack of courage or bravery) of a group or unit.
- assignedGroupReturns Group to which the given vehicle was added last with addVehicle. To update assignedGroup to the current group, run addVehicle to the current…
- assignedVehiclesReturns all vehicles added to the given Group with addVehicle.
- assignTeamAssigns the unit (in case of a vehicle, its commander) to the given team. Team is an option in group control (unit management) menu that allows to…
- attackEnabledReturn whether a group's leader can issue attack commands to soldiers under his command.
- combatBehaviourReturns combat behaviour of unit or group. To set unit or group behaviour see setCombatBehaviour. The behaviour is one of:
- combatModeReturns the combat mode of the given AI group. See setCombatMode for more information about combat modes.
- commandMoveOrder the given unit(s) to move to the given location (via the radio). Exactly the same as doMove, except this command displays a radio message.
- commandStopOrder the given unit(s) to stop via radio. A stop command will never finish, the unit(s) will never be ready.
- commandTargetOrder the given unit(s) to target the given target (via the radio). Command given to the player, puts a red square with words Target and Distance on…
- createGroupCreates a new Group for the given Side. Using this command if the group limit is reached will return grpNull. The new Group exists globally, but it's…
- deleteGroupDestroys the given group - the group must be empty and local to the machine executing this command.
- deleteGroupWhenEmptyMarks given group for auto-deletion when group is empty. true will mark the group for auto-deletion once empty, false will simply unmark the group…
- dissolveTeamDissolves the given team. All members become members of the main team.
- enableAttackSet if leader can issue attack commands to the soldiers in his group.
- forgetTargetResets the info a group has about a target, forcing knowsAbout value to 0.
- formationReturns the current formation of a group.
- formationDirectionReturn the direction in degrees of the 'unit' watching in formation.
- formationMembersReturn list of units (drivers) in the formation.
- formationTaskReturn the current task of the unit in the formation.
- groupReturns the group a unit is assigned to.
- groupFromNetIdGet group from the provided unique ID. For objects, use objectFromNetId.
- groupIdReturns a group's name or a unit's group ID number.
- groupsReturns an array with all groups of given side.
- grpNullA non-existing Group. To compare non-existent groups use isNull or isEqualTo:
- inAreaArrayIndexesReturns indices of positions that are within the provided area.
- isFormationLeaderReturns true if the specified unit is subgroup leader.
- isGroupDeletedWhenEmptyChecks if the given group marked for auto-deletion when empty. See deleteGroupWhenEmpty.
- joinJoins units into a given Group.
- joinAsJoins the unit to the given group, if position id is available, this one is used.
- joinAsSilentJoins the unit to the given group, if position id is available, this one is used. Avoid any radio communication related to joining.
- joinSilentJoin all units in the array to given group silently (without radio message). To have a group member leave a group, join him with the grpNull group…
- leaderReturns the group leader for the given unit or group. For dead units, objNull is returned.
- leaveVehicleCeases the using of the vehicle by a group and unassigns vehicle from the group. If the argument is a single unit, the vehicle will be unassigned…
- onBriefingGroupSelect a sound declared in the Description.ext of the mission to be played the first time the Group tab is selected in the briefing.
- resetSubgroupDirectionSets formation direction of a group relative to current direction of the group leader. The group units will change their positions to form new…
- selectLeaderSelect the group's leader. Group locality can be checked with local command and group ownership with groupOwner command.
- setBehaviourSets individual unit behaviour on every unit in a group.
- setBehaviourStrongSets individual unit behaviour on every unit in a group and additionally tries to force this behaviour to the unit's group. Alternatively see…
- setCombatBehaviourSets an individual unit entity behaviour (main syntax) or a group entity behaviour (alternative syntax). The group in this case is a Group entity and…
- setCombatModeSets AI group combat mode (engagement rules). For individual unit's combat mode see setUnitCombatMode.
- setFormationSet group formation.
- setFormDirSets group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this…
- setGroupIdSets the group radio callsign, how it will be displayed in radio chat. Two groups on the same side cannot have the same callsign (possible on…
- setGroupIdGlobalA global equivalent of setGroupId.
- setSpeedModeSets group speed mode. If unit is passed as param, unit's group is used. Mode may be one of: - "UNCHANGED" (unchanged) - "LIMITED" (half speed) -…
- speedModeReturns speed mode of the group, which can be any of the following: - "LIMITED" - "NORMAL" - "FULL"
- unassignTeamUnassigns the unit (in the case of a vehicle its commander unit) from his team. This is equal to unit assignTeam "MAIN".
- unitsReturns an array with all the units in the group or unit's group, or all units belonging to a certain side.