Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionSetEntityFaction.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionSetEntityFaction
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Entity that faction will be set to."
)]
5
ref
SCR_ScenarioFrameworkGet
m_EntityGetter;
6
7
[
Attribute
(
desc
:
"Faction key"
)]
8
string
m_sFactionKey;
9
//------------------------------------------------------------------------------------------------
10
override
void
OnActivate
(
IEntity
object
)
11
{
12
if
(!CanActivate())
13
return
;
14
15
IEntity
entity;
16
if
(!ValidateInputEntity(
object
, m_EntityGetter, entity))
17
return
;
18
19
FactionAffiliationComponent factionComponent = FactionAffiliationComponent.Cast(entity.
FindComponent
(FactionAffiliationComponent));
20
if
(!factionComponent)
21
{
22
if
(
object
)
23
PrintFormat
(
"ScenarioFramework Action: Faction component not found for Action %1 attached on %2."
,
this
,
object
.
GetName
(), level:
LogLevel
.ERROR);
24
else
25
PrintFormat
(
"ScenarioFramework Action: Faction component not found for Action %1."
,
this
, level:
LogLevel
.ERROR);
26
27
return
;
28
}
29
30
// Resolve Alias
31
SCR_FactionAliasComponent factionAliasComponent = SCR_FactionAliasComponent.Cast(
GetGame
().GetFactionManager().FindComponent(SCR_FactionAliasComponent));
32
if
(factionAliasComponent)
33
m_sFactionKey = factionAliasComponent.ResolveFactionAlias(m_sFactionKey);
34
35
factionComponent.SetAffiliatedFactionByKey(m_sFactionKey);
36
}
37
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionSetEntityFaction
Definition
SCR_ScenarioFrameworkActionSetEntityFaction.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
PrintFormat
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionSetEntityFaction.c
Generated by
1.17.0