Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LeaderRoleCallsign.c
Go to the documentation of this file.
3 {
4  //------------------------------------------------------------------------------------------------
5  override bool IsValidRole(IEntity character, int playerID, SCR_AIGroup group, inout int roleCallsignIndex, out bool isUnique)
6  {
7  if (!character)
8  return false;
9 
10  //~ Slave group can never have the leader role
11  if (!group || group.IsSlave())
12  return false;
13 
14  if (!super.IsValidRole(character, playerID, group, roleCallsignIndex, isUnique))
15  return false;
16 
17  if (group.GetLeaderEntity() == character)
18  {
19  roleCallsignIndex = GetRoleIndex();
20  return true;
21  }
22 
23  return false;
24  }
25 
26  //------------------------------------------------------------------------------------------------
27  override int GetRoleIndex()
28  {
29  return ERoleCallsign.SQUAD_LEADER;
30  }
31 };
SCR_BaseRoleCallsign
Definition: SCR_BaseRoleCallsign.c:2
ERoleCallsign
ERoleCallsign
Definition: ERoleCallsign.c:4
BaseContainerCustomStringTitleField
class SCR_HitZoneGroupNameHolder BaseContainerCustomStringTitleField("USE INHERENT VERSION ONLY!")
Definition: SCR_HitZoneGroupNameHolder.c:27
SCR_LeaderRoleCallsign
Definition: SCR_LeaderRoleCallsign.c:2
SCR_AIGroup
Definition: SCR_AIGroup.c:68
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468