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_AIDecoMachinegunnerBipod.c
Go to the documentation of this file.
1
class
SCR_AIDecoMachinegunnerBipod
:
DecoratorScripted
2
{
3
protected
static
const
string
PORT_TARGET_VISIBLE
=
"TargetVisible"
;
4
protected
static
const
string
PORT_TARGET_POSITION
=
"TargetPos"
;
5
6
[
Attribute
(
"10"
,
UIWidgets
.EditBox)]
7
protected
float
m_fDistanceThreshold
;
8
9
ref
TStringArray
s_aVarsIn
= {
PORT_TARGET_VISIBLE
,
PORT_TARGET_POSITION
};
10
11
protected
IEntity
m_ControlledEntity
;
12
13
override
TStringArray
GetVariablesIn
() {
return
s_aVarsIn
; };
14
15
override
void
OnInit
(AIAgent owner)
16
{
17
m_ControlledEntity
= owner.GetControlledEntity();
18
}
19
20
override
bool
TestFunction
(AIAgent owner)
21
{
22
vector
targetPos;
23
bool
targetVisible;
24
25
if
(!
m_ControlledEntity
||
26
!
GetVariableIn
(
PORT_TARGET_POSITION
, targetPos) ||
27
!
GetVariableIn
(
PORT_TARGET_VISIBLE
, targetVisible))
28
return
false
;
29
30
float
distance
=
vector
.Distance(targetPos,
m_ControlledEntity
.GetOrigin());
31
32
return
distance
>
m_fDistanceThreshold
&& targetVisible;
33
}
34
35
static
override
string
GetOnHoverDescription
() {
return
"Tests conditions specific for machinegunner bopod deployment behavior. This node is not intended for generic usage."
; }
36
}
distance
float distance
Definition
SCR_DestructibleTreeV2.c:29
DecoratorScripted
Definition
DecoratorScripted.c:13
IEntity
Definition
IEntity.c:13
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AIDecoMachinegunnerBipod
Definition
SCR_AIDecoMachinegunnerBipod.c:2
SCR_AIDecoMachinegunnerBipod::PORT_TARGET_VISIBLE
static const string PORT_TARGET_VISIBLE
Definition
SCR_AIDecoMachinegunnerBipod.c:3
SCR_AIDecoMachinegunnerBipod::s_aVarsIn
ref TStringArray s_aVarsIn
Definition
SCR_AIDecoMachinegunnerBipod.c:9
SCR_AIDecoMachinegunnerBipod::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIDecoMachinegunnerBipod.c:13
SCR_AIDecoMachinegunnerBipod::m_ControlledEntity
IEntity m_ControlledEntity
Definition
SCR_AIDecoMachinegunnerBipod.c:11
SCR_AIDecoMachinegunnerBipod::PORT_TARGET_POSITION
static const string PORT_TARGET_POSITION
Definition
SCR_AIDecoMachinegunnerBipod.c:4
SCR_AIDecoMachinegunnerBipod::OnInit
override void OnInit(AIAgent owner)
Definition
SCR_AIDecoMachinegunnerBipod.c:15
SCR_AIDecoMachinegunnerBipod::m_fDistanceThreshold
float m_fDistanceThreshold
Definition
SCR_AIDecoMachinegunnerBipod.c:7
SCR_AIDecoMachinegunnerBipod::TestFunction
override bool TestFunction(AIAgent owner)
Definition
SCR_AIDecoMachinegunnerBipod.c:20
SCR_AIDecoMachinegunnerBipod::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDecoMachinegunnerBipod.c:35
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Soldier
SCR_AIDecoMachinegunnerBipod.c
Generated by
1.17.0