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_AIDecoWeaponUnobstructed.c
Go to the documentation of this file.
1
class
SCR_AIDecoWeaponUnobstructed
:
DecoratorScripted
2
{
3
static
override
bool
VisibleInPalette
() {
return
true
; }
4
5
protected
CharacterControllerComponent
m_CharacterController
;
6
protected
CompartmentAccessComponent
m_CompartmentAccess
;
7
protected
bool
m_bInitialized
;
8
9
override
bool
TestFunction
(AIAgent owner)
10
{
11
if
(!
m_bInitialized
)
12
return
false
;
13
14
// Don't care if in compartment
15
if
(
m_CompartmentAccess
.GetCompartment())
16
return
true
;
17
18
return
m_CharacterController
.GetWeaponObstructedState() ==
EWeaponObstructedState
.UNOBSTRUCTED;
19
}
20
21
override
void
OnInit
(AIAgent owner)
22
{
23
IEntity
controlledEntity = owner.GetControlledEntity();
24
m_CharacterController
= CharacterControllerComponent.Cast(controlledEntity.
FindComponent
(CharacterControllerComponent));
25
m_CompartmentAccess
= CompartmentAccessComponent.Cast(controlledEntity.
FindComponent
(CompartmentAccessComponent));
26
m_bInitialized
=
m_CharacterController
&&
m_CompartmentAccess
;
27
}
28
29
static
override
string
GetOnHoverDescription
()
30
{
31
return
"Returns TRUE if current weapon is not obstructed"
;
32
}
33
}
DecoratorScripted
Definition
DecoratorScripted.c:13
DecoratorScripted::VisibleInPalette
override bool VisibleInPalette()
Definition
DecoratorScripted.c:15
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_AIDecoWeaponUnobstructed
Definition
SCR_AIDecoWeaponUnobstructed.c:2
SCR_AIDecoWeaponUnobstructed::TestFunction
override bool TestFunction(AIAgent owner)
Definition
SCR_AIDecoWeaponUnobstructed.c:9
SCR_AIDecoWeaponUnobstructed::m_CompartmentAccess
CompartmentAccessComponent m_CompartmentAccess
Definition
SCR_AIDecoWeaponUnobstructed.c:6
SCR_AIDecoWeaponUnobstructed::OnInit
override void OnInit(AIAgent owner)
Definition
SCR_AIDecoWeaponUnobstructed.c:21
SCR_AIDecoWeaponUnobstructed::m_bInitialized
bool m_bInitialized
Definition
SCR_AIDecoWeaponUnobstructed.c:7
SCR_AIDecoWeaponUnobstructed::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDecoWeaponUnobstructed.c:29
SCR_AIDecoWeaponUnobstructed::m_CharacterController
CharacterControllerComponent m_CharacterController
Definition
SCR_AIDecoWeaponUnobstructed.c:5
EWeaponObstructedState
EWeaponObstructedState
Definition
EWeaponObstructedState.c:13
scripts
Game
AI
ScriptedNodes
Weapons
SCR_AIDecoWeaponUnobstructed.c
Generated by
1.17.0