22 [
Attribute(
"1",
desc:
"If checked, the added agent will tune the radio to the group frequency")]
25 [
Attribute(
"1",
desc:
"If checked, the player will tune the radio to the group frequency when is spawn")]
31 [
Attribute(defvalue:
"1",
desc:
"When true group menu will be normally accesible, when false group menu will be disabled, but NOT the group functionality")]
34 [
Attribute(
"1",
desc:
"If true reconnected player automatically rejoins the group")]
37 [
Attribute(
"0",
desc:
"When checked, the players are allowed to volunteer for group leader role.")]
40 [
Attribute(
"2",
desc:
"Amount of groups below player capacity that can exist before it restricts you from making more squads of that type",
params:
"0 inf")]
52 static Widget s_wDebugLayout;
96 RplComponent rplComponent = RplComponent.Cast(
GetOwner().FindComponent(RplComponent));
100 return rplComponent.IsProxy();
142 SCR_PlayerControllerGroupComponent playerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
143 if (!playerGroupController)
152 array<int> requesterIDs = {};
155 for (
int i = 0, count = requesterIDs.Count(); i < count; i++)
158 SCR_NotificationsComponent.SendToPlayer(requesterIDs[i],
ENotification.GROUPS_REQUEST_CANCELLED);
161 playerGroupController.ClearAllRequesters(groupRplID);
195 FactionManager factionManager =
GetGame().GetFactionManager();
199 array<Faction> factions = {};
200 factionManager.GetFactionsList(factions);
202 bool isCommanderRoleEnabled =
true;
204 if (gameModeCampaign)
205 isCommanderRoleEnabled = gameModeCampaign.GetCommanderRoleEnabled();
207 int presetGroupId = 1;
208 foreach (
Faction faction : factions)
214 array<ref SCR_GroupPreset> groups = {};
217 array<SCR_GroupRolePresetConfig> groupRolePresetConfigs = {};
225 const int groupId = presetGroupId++;
227 if (!isCommanderRoleEnabled && gr.GetGroupRole() ==
SCR_EGroupRole.COMMANDER)
236 if (group.GetPresetResource() == gr.GetStoreName())
262 if (config.GetGroupRole() == gr.GetGroupRole())
264 config.SetupGroupWithOverride(newGroup, gr);
265 config.SetupGroupFlag(newGroup, scrFaction);
266 isConfigFound =
true;
274 gr.SetupGroup(newGroup);
275 gr.SetupGroupFlag(newGroup, scrFaction);
360 array<SCR_AIGroup> groups;
366 for (
int j = groups.Count() - 1; j >= 0; j--)
368 if (groups[j] && groups[j].
GetGroupID() == groupID)
411 Faction faction = factionManager.GetPlayerFaction(playerID);
419 for (
int i = playableGroups.Count() - 1; i >= 0; i--)
422 return playableGroups[i];
435 array<SCR_AIGroup> groups;
440 for (
int j = groups.Count() - 1; j >= 0; j--)
456 s_wDebugLayout =
GetGame().GetWorkspace().CreateWidgets(
"{661C199F3D59BB24}UI/layouts/Debug/Groups.layout");
458 VerticalLayoutWidget groupsLayout = VerticalLayoutWidget.Cast(s_wDebugLayout.FindAnyWidget(
"GroupsLayout"));
463 while (groupsLayout.GetChildren())
465 groupsLayout.GetChildren().RemoveFromHierarchy();
469 for (
int i = playableGroups.Count() - 1; i >= 0; i--)
471 Widget groupEntry =
GetGame().GetWorkspace().CreateWidgets(
"{898A1945FD29FC71}UI/layouts/Debug/GroupsGroupEntry.layout", groupsLayout);
472 RichTextWidget groupName = RichTextWidget.Cast(groupEntry.FindAnyWidget(
"GroupName"));
474 groupName.SetText(playableGroups[i].
GetGroupID().
ToString() +
": " + playableGroups[i].GetCallsignSingleString());
476 array<int> playerIDs = playableGroups[i].GetPlayerIDs();
477 int playersCount = playerIDs.Count();
479 for (
int j = 0; j < playersCount; j++)
481 HorizontalLayoutWidget characterEntry = HorizontalLayoutWidget.Cast(groupEntry.GetWorkspace().CreateWidgets(
"{952C36C11AF74465}UI/layouts/Debug/GroupsCharacterEntry.layout", groupEntry));
482 TextWidget playerNameWidget = TextWidget.Cast(characterEntry.FindAnyWidget(
"CharacterName"));
483 if (!playerNameWidget)
486 playerNameWidget.SetText(SCR_PlayerNamesFilterCache.GetInstance().GetPlayerDisplayName(playerIDs[j]));
505 array<SCR_AIGroup> playableGroupsOrdered = {};
508 return playableGroupsOrdered;
510 int groupCount = playableGroups.Count();
512 array<int> sortedGroupIds = {};
513 for (
int i = 0; i < groupCount; i++)
515 sortedGroupIds.Insert(playableGroups[i].
GetGroupID());
518 sortedGroupIds.Sort();
520 for (
int i = 0; i < groupCount; i++)
522 playableGroupsOrdered.Insert(
FindGroup(sortedGroupIds[i]));
525 return playableGroupsOrdered;
532 array<SCR_AIGroup> allGroups = {};
533 array<SCR_AIGroup> currentGroups = {};
538 for (
int j = currentGroups.Count() - 1; j >= 0; j--)
540 if (currentGroups[j])
541 allGroups.Insert(currentGroups[j]);
545 outAllGroups = allGroups;
554 array<SCR_GroupRolePresetConfig> groupRolePresetConfigs = {};
555 faction.GetGroupRolePresetConfigs(groupRolePresetConfigs);
559 if (preset.GetGroupRole() == groupRole)
560 return preset.GetRequiredRank();
563 return SCR_ECharacterRank.PRIVATE;
572 array<SCR_EGroupRole> availableGroupRoles = {};
577 return availableGroupRoles;
579 array<SCR_GroupRolePresetConfig> groupRolePresetConfigs = {};
584 if (!creatableByPlayerFilter || creatableByPlayerFilter && preset.CanBeCreatedByPlayer())
585 availableGroupRoles.Insert(preset.GetGroupRole());
588 return availableGroupRoles;
597 array<SCR_EGroupRole> availableGroupRoles = {};
601 return availableGroupRoles;
605 array<SCR_GroupRolePresetConfig> availableGroupRolePresetConfigs = {};
609 if (!preset.CanBeCreatedByPlayer())
613 availableGroupRoles.Insert(preset.GetGroupRole());
621 if (isPlayerCommander)
622 return availableGroupRoles;
624 for (
int i = availableGroupRoles.Count() - 1; i >= 0; i--)
626 int joinableGroupAmount = 0;
633 if (group.GetGroupRole() != availableGroupRoles[i])
636 if (group.IsPrivate())
640 if (group.GetPlayerCount() > (group.GetMaxMembers() * 0.5))
643 joinableGroupAmount++;
647 availableGroupRoles.RemoveOrdered(i);
653 return availableGroupRoles;
662 PlayerController pc =
GetGame().GetPlayerController();
665 playerId = pc.GetPlayerId();
671 array<SCR_GroupRolePresetConfig> availableGroupRolePresetConfigs = {};
675 if (preset.GetGroupRole() != groupRole || !preset.CanBeCreatedByPlayer())
694 if (!group || group.IsPrivate() || group.GetGroupRole() != groupRole)
697 if (group.GetPlayerCount() <= (group.GetMaxMembers() * 0.5))
708 Faction groupFaction = group.GetFaction();
715 group.SetRadioFrequency(frequency);
756 if (!playableGroups || playableGroups.Count() <= 1)
794 int groupsCount = groups.Count();
802 for (
int i = groupsCount - 1; i >= 0; i--)
833 SCR_ECharacterRank requiredRank = preset.GetRequiredRank();
836 if (!ignoreGroupRequiredRank && playerRank < requiredRank)
839 SCR_EntityCatalogManagerComponent entityCatalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
840 if (!entityCatalogManager)
844 requiredRank = SCR_ECharacterRank.INVALID;
845 array<ResourceName> loadouts = preset.
GetLoadouts();
851 resource =
Resource.Load(loadoutResource);
855 entry = entityCatalogManager.GetEntryWithPrefabFromAnyCatalog(
EEntityCatalogType.CHARACTER, resource.GetResource().GetResourceName());
863 requiredRank =
Math.Min(requiredRank,
data.GetRequiredRank());
866 return playerRank >= requiredRank;
876 array<SCR_GroupRolePresetConfig> groupRolePresetConfigs = {};
882 if (preset.GetGroupRole() == role)
884 groupPreset = preset;
894 private BaseRadioComponent GetCommunicationDevice(notnull
IEntity controlledEntity)
896 SCR_GadgetManagerComponent gagdetManager = SCR_GadgetManagerComponent.Cast(controlledEntity.FindComponent(SCR_GadgetManagerComponent));
904 return BaseRadioComponent.Cast(radio.
FindComponent(BaseRadioComponent));
908 private void TuneAgentsRadio(AIAgent agentEntity)
917 BaseRadioComponent radio = GetCommunicationDevice(agentEntity.GetControlledEntity());
930 int playerId =
GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(agentEntity.GetControlledEntity());
938 SCR_VONController vonController = SCR_VONController.Cast(pc.FindComponent(SCR_VONController));
947 void OnGroupAgentAdded(AIAgent child)
949 GetGame().GetCallqueue().CallLater(TuneAgentsRadio, 1,
false, child);
955 void OnGroupAgentRemoved(
SCR_AIGroup group, AIAgent child)
963 if (group.GetAgentsCount() > 0)
976 int groupsCount = groups.Count();
977 if (groupsCount == 0)
981 for (
int i = groupsCount - 1; i >= 0; i--)
983 if (groups[i] == group)
988 DeleteAndUnregisterGroup(group);
997 void DeleteAndUnregisterGroup(notnull
SCR_AIGroup group)
1000 UnregisterGroup(group);
1009 Faction faction = group.GetFaction();
1017 int frequency = group.GetRadioFrequency();
1018 int foundGroupsWithFrequency = 0;
1019 array<SCR_AIGroup> existingGroups = {};
1024 foreach (
SCR_AIGroup checkedGroup : existingGroups)
1026 if (checkedGroup && checkedGroup.GetRadioFrequency() == frequency)
1027 foundGroupsWithFrequency++;
1032 if (foundGroupsWithFrequency <= 1)
1039 if (slaveGroup && slaveGroup.GetAgentsCount() <= 0)
1042 if (groups.Find(group) >= 0)
1043 groups.RemoveItem(group);
1051 array<SCR_AIGroup> outGroups;
1052 Faction faction = group.GetFaction();
1059 else if (outGroups.Contains(group))
1064 outGroups.Insert(group);
1065 group.GetOnAgentAdded().Insert(OnGroupAgentAdded);
1066 group.GetOnAgentRemoved().Insert(OnGroupAgentRemoved);
1074 void RPC_DoSetGroupFaction(
RplId groupID,
int factionIndex)
1076 FactionManager factionManager =
GetGame().GetFactionManager();
1077 if (!factionManager)
1080 Faction faction = factionManager.GetFactionByIndex(factionIndex);
1106 SCR_Faction scrFaction = SCR_Faction.Cast(newFaction);
1119 PlayerController controller = PlayerController.Cast(owner.GetOwner());
1123 SCR_PlayerControllerGroupComponent groupComp = SCR_PlayerControllerGroupComponent.Cast(controller.FindComponent(SCR_PlayerControllerGroupComponent));
1139 groupComp.ResetGroupIDs_S();
1145 SCR_PlayerControllerGroupComponent playerGroupCompoment = SCR_PlayerControllerGroupComponent.GetPlayerControllerComponent(playerID);
1146 if (!playerGroupCompoment)
1159 playerGroupCompoment.RequestJoinGroup(group.
GetGroupID());
1168 playerGroupCompoment.RequestJoinGroup(group.
GetGroupID());
1173 playerGroupCompoment.RequestCreateGroupWithData(faction.GetDefaultGroupRoleForNewGroup(),
false,
"",
"",
true);
1211 for (
int i = factionGroups.Count() - 1; i >= 0; i--)
1213 if (!factionGroups[i])
1217 return factionGroups[i];
1230 RplComponent rplComp = RplComponent.Cast(
GetOwner().FindComponent(RplComponent));
1240 if (!groupResource.IsValid())
1247 group.DeactivateAI();
1250 RegisterGroup(group);
1252 AssignGroupID(group);
1257 if (commandingManager)
1267 slaveGroup.DeactivateAI();
1269 RplComponent RplComp = RplComponent.Cast(slaveGroup.FindComponent(RplComponent));
1273 RplId slaveGroupRplID = RplComp.Id();
1275 RplComp = RplComponent.Cast(group.FindComponent(RplComponent));
1285 GetGame().GetCallqueue().CallLater(UpdateDebugUI, 1,
false);
1303 for (
int i = 0, count = factionGroups.Count(); i < count; i++)
1305 if (!factionGroups[i].
IsFull() && factionGroups[i] != ownGroup && (!respectPrivate || !factionGroups[i].
IsPrivate()))
1307 group = factionGroups[i];
1336 if (availableGroupRoles.IsEmpty())
1369 int factionHQFrequency;
1371 if (militaryFaction)
1378 if (minFrequencyAvailable == factionHQFrequency)
1387 if (usedForFactions.Find(frequencyFaction) == -1)
1394 return minFrequencyAvailable;
1396 Print(
"Ran out of frequencies for groups",
LogLevel.WARNING);
1412 factions.Insert(faction);
1416 if (usedForFactions.Find(faction) == -1)
1418 usedForFactions.Insert(faction);
1433 if (usedForFactions.Find(faction))
1445 if (!faction || !frequency)
1451 if (factions.Count() <= 1 && factions.Find(faction) != -1)
1455 int factionIdx = factions.Find(faction);
1456 if (factionIdx >= 0 && factionIdx < factions.Count())
1457 factions.Remove(factionIdx);
1490 RplComponent rplComp = RplComponent.Cast(
Replication.FindItem(masterGroupID));
1494 masterGroup =
SCR_AIGroup.Cast(rplComp.GetEntity());
1498 rplComp = RplComponent.Cast(
Replication.FindItem(slaveGroupID));
1517 SCR_ChimeraCharacter AIMember;
1518 array<SCR_ChimeraCharacter> AIMembers;
1519 GetAIMembers(groupRplCompID, aiCharacterComponentID, AIMembers, AIMember);
1520 if (!AIMembers || !AIMember)
1523 AIMember.SetRecruited(
false);
1524 AIMembers.RemoveItem(AIMember);
1532 void GetAIMembers(
RplId groupRplCompID,
RplId aiCharacterComponentID, out array<SCR_ChimeraCharacter> members, out SCR_ChimeraCharacter AIMember)
1534 RplComponent rplComp = RplComponent.Cast(
Replication.FindItem(aiCharacterComponentID));
1538 AIMember = SCR_ChimeraCharacter.Cast(rplComp.GetEntity());
1542 rplComp = RplComponent.Cast(
Replication.FindItem(groupRplCompID));
1580 SCR_ChimeraCharacter AIMember;
1581 array<SCR_ChimeraCharacter> AIMembers;
1582 GetAIMembers(groupRplCompID, aiCharacterComponentID, AIMembers, AIMember);
1583 if (!AIMembers || !AIMember)
1586 AIMember.SetRecruited(
true);
1587 AIMembers.Insert(AIMember);
1595 if (!group || !agent)
1598 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(agent.GetControlledEntity());
1602 RplId groupCompRplID, characterCompRplID;
1603 RplComponent rplComp = RplComponent.Cast(group.FindComponent(RplComponent));
1607 groupCompRplID = rplComp.Id();
1609 rplComp = RplComponent.Cast(character.FindComponent(RplComponent));
1613 characterCompRplID = rplComp.Id();
1662 PlayerController controller =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1674 BaseRadioComponent radioComponent = BaseRadioComponent.Cast(radio.
FindComponent(BaseRadioComponent));
1675 if (!radioComponent)
1678 SCR_PlayerControllerGroupComponent groupComponent = SCR_PlayerControllerGroupComponent.Cast(controller.FindComponent(SCR_PlayerControllerGroupComponent));
1679 if (!groupComponent || groupComponent.GetActualGroupFrequency() == 0)
1686 transceiver.SetFrequency(groupComponent.GetActualGroupFrequency());
1695 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1697 if (playerFactionAffiliation)
1705 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1706 if (playerController)
1709 if (playerFactionAffiliation)
1759 s_wDebugLayout.RemoveFromHierarchy();
ArmaReforgerScripted GetGame()
bool IsPlayerInGroup(int playerID)
array< SCR_ChimeraCharacter > GetAIMembers()
void SetGroupLeader(int playerID)
Called on the server (authority).
void SCR_AIGroup(IEntitySource src, IEntity parent)
SCR_ECharacterRank GetRequiredRank()
SCR_BaseGameModeComponentClass m_pGameMode
The game mode entity this component is attached to.
SCR_BaseGameMode GetGameMode()
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_CommandingManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_EGroupRole
Group roles.
Get all prefabs that have the spawner data
Get all prefabs that have the spawner the given labels and are valid in the editor mode param catalogType Type to catalog to get prefabs from param editorMode Editor mode to get valid entries from param faction Faction(Optional)
ref array< ResourceName > m_aGroupFlags
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void AskRemoveAiMemberFromGroup(RplId groupRplCompID, RplId aiCharacterComponentID)
ref array< SCR_AIGroup > m_aDeletionQueue
void CreatePredefinedGroups()
Setup preset groups once.
SCR_AIGroup TryFindEmptyGroup(notnull Faction faction)
void AskAddAiMemberToGroup(RplId groupRplCompID, RplId aiCharacterComponentID)
int m_iPlayableGroupFrequencyMin
void SetConfirmedByPlayer(bool isConfirmed)
SCR_AIGroup GetPlayerGroup(int playerID)
bool m_bConfirmedByPlayer
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void RPC_SetCanPlayersChangeAttributes(bool isAllowed)
void RPC_DoSetNewGroupsAllowed(bool isAllowed)
bool AreAllGroupsMajorityFull(SCR_EGroupRole groupRole, notnull Faction faction)
bool m_bTuneAgentsRadioToGroupFrequency
ScriptInvoker GetOnCanPlayersChangeAttributeChanged()
bool m_bAllowRejoinPlayerAfterReconnecting
set< Faction > FactionHolder
array< SCR_EGroupRole > GetAvailableGroupRoles(notnull Faction faction, int playerId)
bool IsGroupMenuAllowed()
void DeleteGroupDelayed(SCR_AIGroup group)
void SetCanPlayersChangeAttributes(bool isAllowed)
called on server only
ref map< int, ref FactionHolder > m_mUsedFrequenciesMap
void TunePlayersFrequency(int playerId, IEntity player)
void ClearRequests(int groupID, int playerID)
ScriptInvoker GetOnPlayableGroupRemoved()
bool m_bAllowGroupLeaderVolunteering
void AddDisconnectedPlayer(int playerID, int groupID)
void SetNewGroupsAllowed(bool isAllowed)
called on server only
ref map< Faction, ref array< SCR_AIGroup > > m_mPlayableGroups
void GetGroupFlags(notnull array< ResourceName > targetArray)
void RPC_DoRemoveAIMemberFromGroup(RplId groupRplCompID, RplId aiCharacterComponentID)
bool HasPlayerRequiredRank(SCR_GroupRolePresetConfig preset, int playerId, bool ignoreGroupRequiredRank)
SCR_AIGroup FindGroup(int groupID)
void AssignGroupFrequency(notnull SCR_AIGroup group)
array< SCR_AIGroup > GetPlayableGroupsByFaction(Faction faction)
bool GetNewGroupsAllowed()
void ReleaseFrequency(int frequency, Faction faction)
void OnGroupPlayerRemoved(SCR_AIGroup group, int playerID)
bool CanCreateNewGroup(notnull Faction newGroupFaction)
bool CanPlayersChangeAttributes()
int m_iPlayableGroupFrequencyMax
void OnGroupCreated(SCR_AIGroup group)
Called on clients (proxies) to notice a playable group has been created.
int m_iPlayableGroupFrequencyOffset
void GetAllPlayableGroups(out array< SCR_AIGroup > outAllGroups)
ref ScriptInvoker m_OnPlayableGroupRemoved
void RequestSetGroupSlave(RplId compID, RplId slaveID)
array< SCR_EGroupRole > GetConfiguredGroupRoles(notnull Faction faction, bool creatableByPlayerFilter=false)
void RpcWrapper(RplId compID, RplId slaveID)
bool m_bTunePlayersRadioToGroupFrequency
int AddPlayerToGroup(int groupID, int playerID)
ref map< int, int > m_mDisconnectedPlayerIDs
<playerID, groupID>
bool IsFrequencyClaimed(int frequency, Faction faction)
bool IsPlayerInAnyGroup(int playerID)
void OnGroupPlayerAdded(SCR_AIGroup group, int playerID)
ScriptInvoker GetOnPlayableGroupCreated()
bool GetConfirmedByPlayer()
array< SCR_AIGroup > GetSortedPlayableGroupsByFaction(Faction faction)
int m_iMovingPlayerToGroupID
int m_iFreeGroupAmountBeforeRestriction
ScriptInvoker GetOnNewGroupsAllowedChanged()
SCR_AIGroup FindGroupInFaction(SCR_EGroupRole role, notnull Faction faction)
void RPC_DoAddAIMemberToGroup(RplId groupRplCompID, RplId aiCharacterComponentID)
SCR_AIGroup GetFirstNotFullForFaction(notnull Faction faction, SCR_AIGroup ownGroup=null, bool respectPrivate=false)
void RPC_DoSetGroupSlave(RplId masterGroupID, RplId slaveGroupID)
int MovePlayerToGroup(int playerID, int previousGroupID, int newGroupID)
SCR_AIGroup CreateNewPlayableGroup(Faction faction, SCR_EGroupRole groupRole=SCR_EGroupRole.NONE)
void ~SCR_GroupsManagerComponent()
int GetFreeFrequency(Faction frequencyFaction)
SCR_GroupRolePresetConfig FindGroupRolePresetConfig(notnull Faction faction, SCR_EGroupRole role)
bool IsGroupLeaderVolunteeringAllowed()
ref ScriptInvoker m_OnCanPlayersChangeAttributeChanged
void OnAIMemberRemoved(SCR_AIGroup group, AIAgent agent)
bool CanCreateGroupWithLocalPlayerRank(SCR_EGroupRole groupRole, notnull Faction faction)
ref ScriptInvoker m_OnNewGroupsAllowedChanged
bool m_bCanPlayersChangeAttributes
void SetPrivateGroup(int groupID, bool isPrivate)
void RejoinPlayer(int playerID, notnull SCR_Faction faction)
ref map< Faction, int > m_mPlayableGroupFrequencies
void ClaimFrequency(int frequency, Faction faction)
ref ScriptInvoker m_OnPlayableGroupCreated
void OnPlayerFactionChanged(SCR_PlayerFactionAffiliationComponent component, Faction previous, Faction current)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
Object holding reference to resource. In destructor release the resource.
Replication item identifier.
array< SCR_ChimeraCharacter > GetAIMembers()
void RemovePlayer(int playerID)
Called on the server (authority).
int GetPlayerCount(bool checkMasterAndSlaves=false)
static ScriptInvoker GetOnPlayerRemoved()
ScriptInvoker GetOnAgentRemoved()
SCR_EGroupRole GetGroupRole()
void AddPlayer(int playerID)
Called on the server (authority).
void SetPresetResource(ResourceName preset)
bool IsPrivacyChangeable()
int GetRequesterIDs(out array< int > valueArray)
void SetPrivate(bool isPrivate)
Called on the server (authority).
void SetSlave(SCR_AIGroup group)
void SetCanDeleteIfNoPlayer(bool deleteEmpty)
Sets if the group should be deleted when all players leave.
static ScriptInvoker GetOnPlayerLeaderChanged()
static ScriptInvoker GetOnPlayerAdded()
bool SetFaction(Faction faction)
void SetGroupRole(SCR_EGroupRole groupRole)
bool GetDeleteIfNoPlayer()
Returns true if the group is set to be deleted when all players leave.
bool IsPlayerInGroup(int playerID)
void SetGroupLeader(int playerID)
Called on the server (authority).
int GetDefaultActiveRadioChannel()
ScriptInvokerBase< SCR_BaseGameMode_PlayerIdAndEntity > GetOnPlayerSpawned()
ScriptInvoker GetOnGameStart()
Get prefab entity Data of type Ignores disabled Data s param dataType class of Data type you with to obtain return Entity Data of given type Null if not found *SCR_BaseEntityCatalogData GetEntityDataOfType(typename dataType)
bool GetCanCreateOnlyPredefinedGroups()
int GetFactionRadioFrequency()
bool IsGroupRolesConfigured()
void GetPredefinedGroups(notnull array< ref SCR_GroupPreset > groupArray)
void GetGroupRolePresetConfigs(notnull array< SCR_GroupRolePresetConfig > groupArray)
bool IsEnabledAutoGroupCreationWhenFull()
bool IsPlayerCommander(int playerId)
IEntity GetGadgetByType(EGadgetType type)
static SCR_GadgetManagerComponent GetGadgetManager(IEntity entity)
array< ResourceName > GetLoadouts()
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
SCR_ECharacterRank GetPlayerRankByXP()
IEntity GetOwner()
Owner entity of the fuel tank.
override void EOnInit(IEntity owner)
proto external int GetAgentsCount()
BaseRadioComponentClass BaseTransceiver
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
override void OnPlayerRegistered(int playerId)
override void OnPlayerDisconnected(int playerId, KickCauseCode cause, int timeout)
proto external PlayerController GetPlayerController()
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.