Arma Reforger Script API
|
Base class for storing settings individual AI Agents. 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 | |
void | OnSettingRemoved (notnull SCR_AISettingBase setting) |
void | OnSettingAdded (notnull SCR_AISettingBase setting) |
Protected Attributes | |
ref map< TypeName, ref array< ref SCR_AISettingBase > > | m_mSettings = new map<TypeName, ref array<ref SCR_AISettingBase>>() |
AIBaseUtilityComponent | m_UtilityComp |
Base class for storing settings individual AI Agents.
It solves following tasks:
bool SCR_AISettingsBaseComponent.AddSetting | ( | notnull SCR_AISettingBase | setting, |
bool | createCopy, | ||
bool | removeSameTypeAndOrigin = false ) |
Adds setting object.
Depending on createCopy value, from now on it will be owned by this component, or it will create a copy which will be owned by this component. It's protected. Instead use Add...Setting of derived class. createCopy - when true, a copy of the setting object will be created. When false, this component takes ownership of passed setting object. If you want to add same setting to many agents, always add it with createCopy=true, or make a copy yourself. removeSameTypeAndOrigin - if true, removes all settings which have same categorization type and origin.
Implemented in SCR_AICharacterSettingsComponent.
void SCR_AISettingsBaseComponent.GetAllSettings | ( | notnull array< SCR_AISettingBase > | outSettings | ) |
Returns all setting objects held by this component.
SCR_AISettingBase SCR_AISettingsBaseComponent.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 SCR_AISettingsBaseComponent.GetCurrentSetting | ( | TypeName | settingType, |
int | currentActionCause ) |
Returns current setting based on type and cause value typename settingType - must be one of those returned by GetCategorizationType.
override void SCR_AISettingsBaseComponent.OnPostInit | ( | IEntity | owner | ) |
Implemented in SCR_AICharacterSettingsComponent, and SCR_AIGroupSettingsComponent.
|
protected |
Implemented in SCR_AIGroupSettingsComponent.
|
protected |
Implemented in SCR_AIGroupSettingsComponent.
bool SCR_AISettingsBaseComponent.RemoveChildSettingsOfParent | ( | notnull SCR_AISettingBase | parentSetting | ) |
Removes setting which has provided setting object as parent.
bool SCR_AISettingsBaseComponent.RemoveSetting | ( | notnull SCR_AISettingBase | setting | ) |
void SCR_AISettingsBaseComponent.RemoveSettingsOfTypeAndOrigin | ( | TypeName | t, |
SCR_EAISettingOrigin | origin ) |
typename t - must be one of those returned by GetCategorizationType
void SCR_AISettingsBaseComponent.RemoveSettingsWithFlag | ( | SCR_EAISettingFlags | f | ) |
Iterates all settings, removes all which have given flag.
|
protected |
|
protected |