SGroup
166 functions
- SGroup_Add
- SGroup_AddAbilityAdds an ability to all squads in an sgroup.
- SGroup_AddGroup
- SGroup_AddGroupsAdd a list of multiple sgroups into an existing group.
- SGroup_AddLeadersAdds a leader to all squads in a group that can take a leader.
- SGroup_AddResourceAdds the amount of resource type for a squad.
- SGroup_CalculateClusterSeparation
- SGroup_CallEntityFunctionCalls an Entity_ function on every entity in an sgroup
- SGroup_CallSquadFunctionCalls a Squad_ function on every squad in an sgroup
- SGroup_CallSquadFunctionAllOrAnyReturns whether ALL or ANY squads in an sgroup satisfy a condition, using a Squad_ function to perform the query on each squad
- SGroup_CanCastAbilityOnEntityTest whether ANY or ALL of a group can be ordered to do this ability on the target squad
- SGroup_CanCastAbilityOnPositionTest whether ANY or ALL of a group can be ordered to do this ability on the target position
- SGroup_CanCastAbilityOnSquadTest whether ANY or ALL of a group can be ordered to do this ability on the target entity
- SGroup_CanInstantReinforceNowReturn true if ANY or ALL of a group can reinforce now
- SGroup_CanSeeEGroupReturns true if ALL or ANY entities in a group can see ALL or ANY entities in a given egroup.
- SGroup_CanSeeSGroupReturns true if ALL or ANY squads in a group can see ALL or ANY squads in a target sgroup.
- SGroup_Clear
- SGroup_ClearPostureSuggestion
- SGroup_Compare
- SGroup_CompleteEntityUpgradeApplies an upgrade to all squad entities in an sgroup.
- SGroup_CompleteUpgradeInstantly adds an upgrade to all squads in a given SGroup.
- SGroup_ContainsBlueprintsCheck if a group contains ALL or ANY of the blueprints.
- SGroup_ContainsSGroup
- SGroup_ContainsSquad
- SGroup_Count
- SGroup_CountAlliedSquads
- SGroup_CountBlueprintsReturns the total count of all squads in a given SGroup with the provided blueprint or type
- SGroup_CountDeSpawned
- SGroup_CountEnemySquads
- SGroup_CountPopulationCounts the total population cost of an SGroup by iterating over each individual Squad
- SGroup_CountSpawned
- SGroup_Create
- SGroup_CreateIfNotFoundFind a squad group from name. Creates a new one with given name if it doesnt exist.
- SGroup_CreateKickerMessageCreate and display kicker message on the each squad in the sgroup to the player
- SGroup_CreateTableReturns a table of sgroups NOT in the world builder
- SGroup_CreateUniqueReturns an SGroup with a unique name, prefixed by the 'prefix' parameter.
- SGroup_CreateUniqueWithPrefix
- SGroup_DeSpawnDespawn all spawned squads in a group.
- SGroup_Destroy
- SGroup_DestroyAllInMarkerDestroys all items in a group that are in proximity to a given marker.
- SGroup_DestroyAllSquadsDestroys all spawned and despawned squads in a group.
- SGroup_DisableCombatPlansDisables all current combat plans for the squads in the sgroup
- SGroup_DivideIntoClusters
- SGroup_DuplicateDuplicates an SGroup. Creates a copy of sgroup1 in sgroup2. The function will clear sgroup2 beforehand if necessary.
- SGroup_EnableAttentionSets whether an entity pays attention to its surroundings
- SGroup_EnableMinimapIndicatorEnable or disable minimap indicator on all squads in the sgroup
- SGroup_EnableSurpriseEnables or disables the surprise feature for an sgroup
- SGroup_EnableUIDecoratorEnable or disable decorators on all squads in the sgroup
- SGroup_Exists
- SGroup_FaceEachOtherMakes two SGroups face each other
- SGroup_FaceMarkerMakes a SGroup face a marker.
- SGroup_FacePosition
- SGroup_FilterFilters an SGroup by blueprint.
- SGroup_FilterByProximityFilters an sgroup base on proximity. Use FILTER_KEEP to keep the affected units, or FILTER_REMOVE to remove them. Set invertPosition to TRUE to affect the units outside the position.
- SGroup_FilterCamouflagedFilters an SGroup to either FILTER_REMOVE or FILTER_KEEP units that are currently camouflaged (stealthed included)
- SGroup_FilterCountPass in a group and it will filter it down to the indicated number
- SGroup_FilterOnScreenFilters an SGroup by whether units are on screen or not. Percent refers to the screen area you are considering (0.8 is a good value to use - it won't include things that are right at the screen edge).
- SGroup_FilterSpawnedFilters an sgroup on spawned/despawned status. Use FILTER_KEEP to keep the spawned units (therefore removing the despawned), or FILTER_REMOVE to remove the spawned units (and keep the despawned).
- SGroup_FilterThreatSearches an SGroup and finds the first threat within the table (searching first to last) and removes all other SBPs.
- SGroup_ForEach
- SGroup_ForEachAllOrAny
- SGroup_ForEachAllOrAnyEx
- SGroup_ForEachEx
- SGroup_FromName
- SGroup_GetAvgHealthReturns the average health ratio of all units in a squad group.
- SGroup_GetAvgHealthPercentageWithShieldsReturn the average health ratio, including shield strengths, of the squads in the SGroup
- SGroup_GetAvgLoadoutReturns the average loadout of all squads in a group as a percent [0.0, 1.0].
- SGroup_GetAvgShieldPercentageReturn the average shield strengths of the squads in the SGroup (as a percentage)
- SGroup_GetClosestSquadGet the closest squad in an sgroup to a given position
- SGroup_GetDeSpawnedSquadAt
- SGroup_GetGarrisonedBuildingEntityGet the entity id of the building that any squad of the sgroup is garrisoned in
- SGroup_GetHoldEGroupGets all the entities that an SGroup may occupy and adds them to the EGroupHold
- SGroup_GetHoldSGroupGets all the squads that an SGroup may occupy and adds them to the SGroupHold
- SGroup_GetInvulnerableCheck invulnerablity state for ALL or ANY squads in a squad group.
- SGroup_GetLastAttackerGets the last attacker(s) for all the squads in an SGroup
- SGroup_GetLoadedVehicleSquadGet the squad id of the vehicle squad that any squad of the sgroup is loaded in
- SGroup_GetName
- SGroup_GetOffsetPositionReturns a position (a certain distance away) relative to a squad's current position/orientation. see ScarUtil.scar for explanation of 'offset' parameter
- SGroup_GetPosition
- SGroup_GetRandomSpawnedSquadGet a random spawned squad from sgroup
- SGroup_GetResourceGets the amount of resource type for a squad.
- SGroup_GetSequenceBuilds a table of SGroupIDs that are named in a sequence. i.e. a name of \"sg_killer\" will find groups \"sg_killer1\", \"sg_killer2\" and so on, up until it looks for a group that isn't there.
- SGroup_GetSpawnedSquadAt
- SGroup_GetSpreadReturns the distance from the centre of the group of the unit that furthest out.
- SGroup_GetSquadAt
- SGroup_GetSquadsHeldReturns an sgroup containing all squads held by any squad in an sgroup
- SGroup_GetSuppressionGet the suppression level for the first squad in the sgroup
- SGroup_GetTotalHealthReturns the total health of all units combined in a squad group.
- SGroup_GetVeterancyExperienceGet the veterancy experience value for the first squad in the sgroup
- SGroup_GetVeterancyRankGet the veterancy rank for the first squad in the sgroup
- SGroup_GetWBTableReturns a table of sgroups from the world builder
- SGroup_HasAbilityTest whether ANY or ALL units in a group have a specified ability
- SGroup_HasEntityUpgradeReturns true if ANY or ALL of the squad's entities have the specified upgrade
- SGroup_HasLeaderCheck if ALL or ANY squads in a sgroup have a leader
- SGroup_HasSquadBlueprintCheck if ALL or ANY of the squads in a group have a specific blueprint.
- SGroup_HasTeamWeaponReturns true if ANY or ALL of the squads in an SGroup are carrying some kind of team weapon
- SGroup_HasUpgradeReturns whether ANY or ALL squads in an SGroup have the specified upgrade
- SGroup_HideHide or show all entities in all squads in an SGroup
- SGroup_IncreaseVeterancyExperienceIncrease squad veterancy experience for all squads in the sgroup. Can do silent promotion (no sound/UI). Can skip modifiers, giving you direct control of experience gained.
- SGroup_IncreaseVeterancyRankIncrease squad veterancy rank for all squads in the sgroup. By default, increases rank by 1. Can do silent promotion (no sound/UI. ex: mass rank insrease at mission start)
- SGroup_Intersection
- SGroup_IsAliveReturns true if a named squad group is not empty and its average health is > 0.0
- SGroup_IsAttackMovingReturns true if ANY or ALL squads in an SGroup are attack moving.
- SGroup_IsCamouflagedReturns true if ANY or ALL of the squads in an SGroup are camouflaged
- SGroup_IsCapturingChecks if ANY or ALL squads in an SGroup are capturing
- SGroup_IsConstructingBuildingReturns true if ALL or ANY squads in a group are currently constructing a building.
- SGroup_IsDoingAbilityReturns if ANY or ALL members of an SGroup are doing an ability
- SGroup_IsDoingAttackReturns true if ALL or ANY squads are attacking within the time.
- SGroup_IsDugInReturns true if ANY or ALL of the squads in the SGroup is dug in (or in the process of digging in)
- SGroup_IsEmptyReturns true if a named squad group is empty
- SGroup_IsFemaleReturns true if ANY or ALL squads are female
- SGroup_IsHoldingAnyReturns whether any entity in an SGroup has a hold on anything
- SGroup_IsIdleChecks if ANY or ALL squads in an SGroup are idle
- SGroup_IsInCoverReturns the percentage of the SGroup members that are in cover. Alternatively, specify ANY or ALL as a second parameter to return true/false.
- SGroup_IsInfiltratedReturns true if ALL or ANY squads in a group are infiltrated
- SGroup_IsInHoldEntityChecks if ANY or ALL squads in an SGroup are garrisoned in an entity (building)
- SGroup_IsInHoldSquadChecks if ANY or ALL squads in an SGroup are garrisoned in a squad (transport vehicle)
- SGroup_IsMovingReturns true if ANY or ALL squads in an SGroup are moving.
- SGroup_IsOnScreenReturns true if ANY or ALL (use those keywords) of the squads in the group are present onscreen. You can pass in a percentage of the screen to check, so 0.8 would be a centered rectangle occupying 80% of the screen.
- SGroup_IsPinnedReturns true if ANY or ALL of a group is pinned
- SGroup_IsPinnedOrSuppressedReturns true if ANY or ALL of a group is pinned or suppressed
- SGroup_IsReinforcingReturns true if ALL or ANY squads in a group are currently calling for reinforcments.
- SGroup_IsRetreatingReturns true if ANY or ALL of the squads in an SGroup are currently retreating
- SGroup_IsSettingDemolitionsReturns true if ANY or ALL squads are setting demolitions
- SGroup_IsSuppressedReturns true is ANY or ALL of a group is suppressed
- SGroup_IsUnderAttackReturns true if ALL or ANY squads are under attack within the time.
- SGroup_IsUnderAttackByPlayerCheck if the squads are attacked by the player
- SGroup_IsUnderAttackFromDirectionReturns true if ALL or ANY squads are under attack from a direction within the time. see ScarUtil.scar for types of directions. you can pass in a table of directions
- SGroup_IsUpgradingReturns true if ALL or ANY squads in a group are currently upgrading. You can pass in nil for upgradeid if it doesn't matter what is being upgraded.
- SGroup_IsUsingAbilityChecks if ANY or ALL squads in an SGroup are using an ability
- SGroup_IsValid
- SGroup_KillKills all squads in an SGroup. This kills them 'naturally', as opposed to SGroup_DestroyAllSquads() which makes them blink out of existance.
- SGroup_Remove
- SGroup_RemoveAbilityRemoves an ability that was previously added by SGroup_AddAbility. You cannot remove static abilities (from AE: squad_ability_ext)
- SGroup_RemoveGroupRemove from the first SGroup all squads contained in the second SGroup. SGroup2 remains untouched.
- SGroup_RemoveUpgradeRemoves upgrade(s) from an sgroup
- SGroup_RemoveWithdrawTowardsEdgeSquadsRemoves the squads from the sgroup which are withdrawing towards the edge
- SGroup_ReSpawnRespawn all despawned squads in a group.
- SGroup_RestoreCombatPlansRestore all current combat plans for the squads in the sgroup
- SGroup_RewardActionPointsGive action points to the squad
- SGroup_SetAnimatorActionTrigger animation action for an SGroup. Please only use this for simple animations
- SGroup_SetAnimatorEventTrigger animation event for an SGroup. Please only use this for simple animations
- SGroup_SetAnimatorStateSet animation state of a state machine for an SGroup. Please only use this for simple animations
- SGroup_SetAutoTargettingSets whether a weapon will auto-target things or not
- SGroup_SetAvgHealthSets the health of each squad in a squad group to a given percent [0.0, 1.0].
- SGroup_SetAvgMoraleSets the moral of each squad in a squad group to a given percent [0.0, 1.0].
- SGroup_SetCrushableOverrides crushable behavior for an sgroup
- SGroup_SetInvulnerableEnable/Disable invulnerablity for an entire SGroup. Use true and false for simple on/off, or use a number between 0.0 and 1.0 for more precise control on how much damage a squad can take before it takes no more.
- SGroup_SetMoodModeSet soldier mood mode. Mode could be MM_Auto, MM_ForceCalm or MM_ForceTense
- SGroup_SetPlayerOwnerChanges the player owner of spawned and despawned squads in an SGroup.
- SGroup_SetRecrewableSets all squads in as sgroup to be recrewable or not when abandoned
- SGroup_SetResourceSets the amount of resource type for a squad.
- SGroup_SetSelectableSet player selectable state of squads in the sgroup
- SGroup_SetSharedProductionQueueEnables shared team production on a building (teammates can build using THEIR resources)
- SGroup_SetSuppressionSet the suppression level for all squads in the sgroup
- SGroup_SetTeamWeaponCapturableSet team weapon in the squads to be capturable or not
- SGroup_SetTeamWeaponDestroyOnAbandonChanceSet chance that team weapons in sgroup will self destruct on abandon
- SGroup_SetVeterancyDisplayVisibilitySets the visibility of in-game veterancy art for the squads in given SGroup
- SGroup_SetWorldOwnedMakes an sgroup neutral
- SGroup_SingleCreates a squad group containing a single squad
- SGroup_SnapFaceEachOtherMakes two SGroups face each other at no time
- SGroup_SnapFacePosition
- SGroup_SuggestPosture
- SGroup_TotalMembersCountReturns the total count of all members of all the squads in a given SGroup.
- SGroup_WarpToMarkerWarps all members of an SGroup immediately to a marker
- SGroup_WarpToPosWarps all members of an SGroup immediately to a new position