Arma Reforger Script API
|
Public Member Functions | |
bool | AddCharacterSetting (notnull SCR_AICharacterSetting setting, bool createCopy, bool removeSameTypeAndOrigin=false) |
Adds settings to character. | |
override void | OnPostInit (IEntity owner) |
![]() | |
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. | |
Static Public Member Functions | |
static SCR_AICharacterSettingsComponent | FindOnControlledEntity (notnull IEntity entity) |
Finds settings component of controlled entity (character) | |
Protected Member Functions | |
override bool | AddSetting (notnull SCR_AISettingBase setting, bool createCopy, bool removeSameTypeAndOrigin=false) |
It's overridden as protected. This way SCR_AICharacterSettingsComponent accepts only character settings. | |
![]() | |
void | OnSettingRemoved (notnull SCR_AISettingBase setting) |
void | OnSettingAdded (notnull SCR_AISettingBase setting) |
Protected Attributes | |
ref array< ref SCR_AICharacterSetting > | m_aDefaultSettings |
![]() | |
ref map< TypeName, ref array< ref SCR_AISettingBase > > | m_mSettings = new map<TypeName, ref array<ref SCR_AISettingBase>>() |
AIBaseUtilityComponent | m_UtilityComp |
bool SCR_AICharacterSettingsComponent.AddCharacterSetting | ( | notnull SCR_AICharacterSetting | setting, |
bool | createCopy, | ||
bool | removeSameTypeAndOrigin = false ) |
Adds settings to character.
This is meant only for character-related settings, those inheriting from SCR_AICharacterSetting. 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.
|
protected |
It's overridden as protected. This way SCR_AICharacterSettingsComponent accepts only character settings.
Implements SCR_AISettingsBaseComponent.
|
static |
Finds settings component of controlled entity (character)
override void SCR_AICharacterSettingsComponent.OnPostInit | ( | IEntity | owner | ) |
Implements SCR_AISettingsBaseComponent.
|
protected |