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_AIGetLookParameters.c
Go to the documentation of this file.
1
class
SCR_AIGetLookParameters
:
AITaskScripted
2
{
3
static
const
string
PORT_LOOK =
"bLook"
;
4
static
const
string
PORT_CANCEL =
"bCancel"
;
5
static
const
string
PORT_RESTART =
"bRestart"
;
6
static
const
string
PORT_POSITION =
"vPosition"
;
7
static
const
string
PORT_DURATION =
"vDuration"
;
8
9
SCR_AILookAction
m_LookAction;
10
SCR_AISectorThreatFilter
m_ThreatFilter;
11
12
override
ENodeResult
EOnTaskSimulate(AIAgent owner,
float
dt)
13
{
14
if
(!m_LookAction)
15
return
ENodeResult
.FAIL;
16
17
bool
look, cancelLook, restartLook;
18
vector
lookPos;
19
float
lookDuration;
20
m_LookAction.MoveLookParametersToNode(look, lookPos, lookDuration, cancelLook, restartLook);
21
22
SetVariableOut
(PORT_LOOK, look);
23
24
if
(look)
25
{
26
SetVariableOut
(PORT_CANCEL, cancelLook);
27
SetVariableOut
(PORT_RESTART, restartLook);
28
29
SetVariableOut
(PORT_POSITION, lookPos);
30
SetVariableOut
(PORT_DURATION, lookDuration);
31
}
32
33
return
ENodeResult
.SUCCESS;
34
}
35
36
protected
static
override
bool
VisibleInPalette
() {
return
true
;}
37
protected
static
override
string
GetOnHoverDescription
() {
return
"Gets parameters of a lookAction"
;}
38
39
override
void
OnInit
(AIAgent owner)
40
{
41
SCR_AIUtilityComponent utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
42
43
if
(utility)
44
{
45
m_LookAction = utility.m_LookAction;
46
m_ThreatFilter = utility.m_SectorThreatFilter;
47
}
48
}
49
50
protected
static
ref
TStringArray
s_aVarsOut
= {
51
PORT_LOOK,
52
PORT_CANCEL,
53
PORT_RESTART,
54
PORT_POSITION,
55
PORT_DURATION
56
};
57
override
TStringArray
GetVariablesOut
()
58
{
59
return
s_aVarsOut
;
60
}
61
};
AITaskScripted
Definition
AITaskScripted.c:13
Node::SetVariableOut
proto void SetVariableOut(string name, void val)
SCR_AIGetLookParameters
Definition
SCR_AIGetLookParameters.c:2
SCR_AIGetLookParameters::s_aVarsOut
static ref TStringArray s_aVarsOut
Definition
SCR_AIGetLookParameters.c:50
SCR_AIGetLookParameters::GetVariablesOut
override TStringArray GetVariablesOut()
Definition
SCR_AIGetLookParameters.c:57
SCR_AIGetLookParameters::OnInit
override void OnInit(AIAgent owner)
Definition
SCR_AIGetLookParameters.c:39
SCR_AIGetLookParameters::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIGetLookParameters.c:36
SCR_AIGetLookParameters::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIGetLookParameters.c:37
SCR_AILookAction
Definition
SCR_AILookAction.c:2
SCR_AISectorThreatFilter
Definition
SCR_AISectorThreatFilter.c:95
vector
Definition
vector.c:13
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Behavior
SCR_AIGetLookParameters.c
Generated by
1.17.0