Arma Reforger Script API
|
SCR_AIGroupSettingsComponent can store settings intended both for group itself and for group members. More...
Public Member Functions | |
override void | OnPostInit (IEntity owner) |
![]() | |
bool | AddSetting (notnull SCR_AISettingBase setting, bool createCopy, bool removeSameTypeAndOrigin=false) |
Adds setting object. | |
bool | RemoveSetting (notnull SCR_AISettingBase setting) |
bool | RemoveChildSettingsOfParent (notnull SCR_AISettingBase parentSetting) |
Removes setting which has provided setting object as parent. | |
void | RemoveSettingsWithFlag (SCR_EAISettingFlags f) |
Iterates all settings, removes all which have given flag. | |
void | RemoveSettingsOfTypeAndOrigin (TypeName t, SCR_EAISettingOrigin origin) |
typename t - must be one of those returned by GetCategorizationType | |
SCR_AISettingBase | GetCurrentSetting (TypeName settingType) |
Returns current setting based on type and cause value of current action typename settingType - must be one of those returned by GetCategorizationType. | |
SCR_AISettingBase | GetCurrentSetting (TypeName settingType, int currentActionCause) |
Returns current setting based on type and cause value typename settingType - must be one of those returned by GetCategorizationType. | |
void | GetAllSettings (notnull array< SCR_AISettingBase > outSettings) |
Returns all setting objects held by this component. | |
Protected Member Functions | |
override void | OnSettingAdded (notnull SCR_AISettingBase setting) |
override void | OnSettingRemoved (notnull SCR_AISettingBase setting) |
void | AddSettingToMembers (notnull SCR_AICharacterSetting setting) |
Creates copy and adds setting to all group members. | |
void | RemoveSettingFromMembers (notnull SCR_AICharacterSetting setting) |
Iterates all group members and removes from them all settings which are linked to passed setting. | |
void | OnAgentAdded (AIAgent agent) |
void | OnAgentRemoved (AIGroup group, AIAgent agent) |
void | OnCurrentWaypointChanged (AIWaypoint _currentWp, AIWaypoint _prevWp) |
Protected Attributes | |
SCR_AIGroup | m_Group |
ref array< ref SCR_AISettingBase > | m_aDefaultSettings |
![]() | |
ref map< TypeName, ref array< ref SCR_AISettingBase > > | m_mSettings = new map<TypeName, ref array<ref SCR_AISettingBase>>() |
AIBaseUtilityComponent | m_UtilityComp |
SCR_AIGroupSettingsComponent can store settings intended both for group itself and for group members.
Settings inheriting from SCR_AIGroupSetting are treated as usual. They are meant to be used by group.
Settings inheriting from SCR_AICharacterSetting are stored here but are meant for group members. They are automatically distributed to group members when added. When a new member joins the group, group's character settings are passed to the new member. When a member leaves the group, settings added to it from this group are removed from it.
To add settings, call AddSetting.
|
protected |
Creates copy and adds setting to all group members.
createCopy - when true, a copy of the setting object will be created. When false, this component takes ownership of passed setting object. It also makes copy of passed object for each group member, but it's not related to createCopy parameter.
|
protected |
|
protected |
|
protected |
override void SCR_AIGroupSettingsComponent.OnPostInit | ( | IEntity | owner | ) |
Implements SCR_AISettingsBaseComponent.
|
protected |
Implements SCR_AISettingsBaseComponent.
|
protected |
Implements SCR_AISettingsBaseComponent.
|
protected |
Iterates all group members and removes from them all settings which are linked to passed setting.
|
protected |
|
protected |