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_ScenarioFrameworkOnAnimationEvent.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionOnAnimationEvent
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Entity to listen animation events on"
)]
5
ref
SCR_ScenarioFrameworkGet
m_Getter;
6
7
[
Attribute
(
""
,
UIWidgets
.Auto)]
8
string
m_sAnimationEventString;
9
10
[
Attribute
(
desc
:
"Actions to be executed if conditions' evaluation is successful."
)]
11
ref array<ref SCR_ScenarioFrameworkActionBase> m_aActions;
12
13
SCR_CharacterControllerComponent
m_CharController;
14
15
//------------------------------------------------------------------------------------------------
16
override
void
OnActivate
(
IEntity
object
)
17
{
18
if
(!CanActivate())
19
return
;
20
21
IEntity
entity;
22
if
(!ValidateInputEntity(
object
, m_Getter, entity))
23
return
;
24
25
m_CharController =
SCR_CharacterControllerComponent
.Cast(entity.
FindComponent
(
SCR_CharacterControllerComponent
));
26
27
if
(m_CharController)
28
{
29
m_CharController.GetOnAnimationEvent().Remove(OnAnimationEvent);
30
m_CharController.GetOnAnimationEvent().Insert(OnAnimationEvent);
31
}
32
}
33
34
//------------------------------------------------------------------------------------------------
36
void
OnAnimationEvent(
AnimationEventID
animEventType,
AnimationEventID
animUserString,
int
intParam,
float
timeFromStart,
float
timeToEnd)
37
{
38
string
eventName =
GameAnimationUtils
.GetEventString(animEventType);
39
40
if
(eventName == m_sAnimationEventString)
41
{
42
foreach
(
SCR_ScenarioFrameworkActionBase
actions : m_aActions)
43
{
44
actions.OnActivate(m_Entity);
45
}
46
}
47
}
48
49
//------------------------------------------------------------------------------------------------
50
override
array<ref SCR_ScenarioFrameworkActionBase> GetSubActions()
51
{
52
array<ref SCR_ScenarioFrameworkActionBase> allActions = {};
53
54
foreach
(
SCR_ScenarioFrameworkActionBase
action : m_aActions)
55
{
56
allActions.Insert(action);
57
}
58
59
return
allActions;
60
}
61
}
AnimationEventID
int AnimationEventID
Definition
AnimationStringTypes.c:1
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
GameAnimationUtils
Definition
GameAnimationUtils.c:8
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_CharacterControllerComponent
Definition
SCR_CharacterControllerComponent.c:36
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkActionOnAnimationEvent
Definition
SCR_ScenarioFrameworkOnAnimationEvent.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkOnAnimationEvent.c
Generated by
1.17.0