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_ScenarioFrameworkActionShowPopupNotification.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionShowPopupNotification
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
()]
5
string
m_sTitle;
6
7
[
Attribute
()]
8
string
m_sText;
9
10
[
Attribute
()]
11
FactionKey
m_sFactionKey;
12
13
[
Attribute
(
desc
:
"Getter to get either a specific player or array of player entities"
)]
14
ref
SCR_ScenarioFrameworkGet
m_Getter;
15
16
//------------------------------------------------------------------------------------------------
17
override
void
OnActivate
(
IEntity
object
)
18
{
19
if
(!CanActivate())
20
return
;
21
22
SCR_ScenarioFrameworkSystem
scenarioFrameworkSystem =
SCR_ScenarioFrameworkSystem
.
GetInstance
();
23
if
(!scenarioFrameworkSystem)
24
return
;
25
26
PlayerManager
playerManager =
GetGame
().GetPlayerManager();
27
if
(!playerManager)
28
return
;
29
30
int
playerID = -1;
31
if
(
EntityUtils
.IsPlayer(
object
))
32
playerID = playerManager.GetPlayerIdFromControlledEntity(
object
);
33
34
array<IEntity> aEntities;
35
36
if
(m_Getter)
37
{
38
// Getter takes the priority. We set it back to -1 in case that object was player.
39
playerID = -1;
40
41
SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_Getter.Get());
42
if
(!entityWrapper)
43
{
44
SCR_ScenarioFrameworkParam<array<IEntity>> arrayOfEntitiesWrapper = SCR_ScenarioFrameworkParam<array<IEntity>>.Cast(m_Getter.Get());
45
if
(!arrayOfEntitiesWrapper)
46
return
;
47
48
aEntities = arrayOfEntitiesWrapper.GetValue();
49
if
(!aEntities)
50
return
;
51
}
52
else
53
{
54
IEntity
entityFrom = entityWrapper.GetValue();
55
if
(entityFrom)
56
playerID = playerManager.GetPlayerIdFromControlledEntity(entityFrom);
57
}
58
}
59
60
// Resolve Alias
61
SCR_FactionAliasComponent factionAliasComponent = SCR_FactionAliasComponent.Cast(
GetGame
().GetFactionManager().FindComponent(SCR_FactionAliasComponent));
62
if
(factionAliasComponent)
63
m_sFactionKey = factionAliasComponent.ResolveFactionAlias(m_sFactionKey);
64
65
if
(!aEntities)
66
{
67
scenarioFrameworkSystem.
PopUpMessage
(m_sTitle, m_sText, m_sFactionKey, playerID);
68
}
69
else
70
{
71
foreach
(
IEntity
entity : aEntities)
72
{
73
if
(!
EntityUtils
.IsPlayer(entity))
74
continue
;
75
76
playerID = playerManager.GetPlayerIdFromControlledEntity(entity);
77
scenarioFrameworkSystem.
PopUpMessage
(m_sTitle, m_sText, m_sFactionKey, playerID);
78
}
79
}
80
}
81
}
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
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
EntityUtils
Definition
EntityUtils.c:13
FactionKey
Definition
FactionKey.c:3
IEntity
Definition
IEntity.c:13
PlayerManager
Definition
PlayerManager.c:13
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionShowPopupNotification
Definition
SCR_ScenarioFrameworkActionShowPopupNotification.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
SCR_ScenarioFrameworkSystem
Definition
SCR_ScenarioFrameworkSystem.c:2
SCR_ScenarioFrameworkSystem::GetInstance
static SCR_ScenarioFrameworkSystem GetInstance()
Definition
SCR_ScenarioFrameworkSystem.c:76
SCR_ScenarioFrameworkSystem::PopUpMessage
void PopUpMessage(string sTitle, string sSubtitle, FactionKey factionKey="", int playerID=-1, string titleParam1="", string titleParam2="", string subtitleParam1="", string subtitleParam2="")
Definition
SCR_ScenarioFrameworkSystem.c:1489
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionShowPopupNotification.c
Generated by
1.17.0