Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CharacterPerceivableComponent.c
Go to the documentation of this file.
1
class
SCR_CharacterPerceivableComponentClass
:
CharacterPerceivableComponentClass
2
{
3
}
4
5
class
SCR_CharacterPerceivableComponent : CharacterPerceivableComponent
6
{
7
protected
SCR_CharacterControllerComponent
m_CharacterController
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
EOnInit
(IEntity owner)
11
{
12
ChimeraCharacter character = ChimeraCharacter.Cast(owner);
13
if
(!character)
14
return
;
15
16
m_CharacterController
=
SCR_CharacterControllerComponent
.Cast(character.GetCharacterController());
17
18
if
(
m_CharacterController
)
19
m_CharacterController
.m_OnLifeStateChanged.Insert(
OnLifeStateChanged
);
20
}
21
22
//------------------------------------------------------------------------------------------------
23
// destructor
24
void
~SCR_CharacterPerceivableComponent
()
25
{
26
if
(
m_CharacterController
)
27
m_CharacterController
.m_OnLifeStateChanged.Remove(
OnLifeStateChanged
);
28
}
29
30
//------------------------------------------------------------------------------------------------
31
protected
void
OnLifeStateChanged
(
ECharacterLifeState
previousLifeState,
ECharacterLifeState
newLifeState)
32
{
33
bool
disarmed = newLifeState !=
ECharacterLifeState
.ALIVE;
34
SetDisarmed
(disarmed);
35
}
36
}
CharacterPerceivableComponentClass
Definition:
CharacterPerceivableComponent.c:12
ECharacterLifeState
ECharacterLifeState
Definition:
ECharacterLifeState.c:12
SetDisarmed
proto external void SetDisarmed(bool disarmed)
m_CharacterController
SCR_CharacterPerceivableComponentClass m_CharacterController
func
func
Definition:
SCR_AIThreatSystem.c:5
SCR_CharacterControllerComponent
Definition:
SCR_CharacterControllerComponent.c:35
EOnInit
override void EOnInit(IEntity owner)
Definition:
SCR_CharacterPerceivableComponent.c:10
~SCR_CharacterPerceivableComponent
void ~SCR_CharacterPerceivableComponent()
Definition:
SCR_CharacterPerceivableComponent.c:24
SCR_CharacterPerceivableComponentClass
Definition:
SCR_CharacterPerceivableComponent.c:1
OnLifeStateChanged
protected void OnLifeStateChanged(ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
Will be called when the life state of the character changes.
Definition:
SCR_CharacterPerceivableComponent.c:31
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
AI
Components
SCR_CharacterPerceivableComponent.c
Generated by
1.8.17