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_AIFollowEntityPath.c
Go to the documentation of this file.
1
4
5
class
SCR_AIFollowEntityPath
:
SCR_AIActionTask
6
{
7
static
const
string
PORT_ENTITY_IN =
"GroupIn"
;
8
9
//------------------------------------------------------------------------------------------------
10
ChimeraCharacter
m_pCharacter;
11
GenericEntity
m_pFollowedEntity;
12
bool
setupResult;
13
AIBaseMovementComponent m_pMyMovementComponent;
14
15
static
override
bool
VisibleInPalette
()
16
{
17
return
true
;
18
}
19
20
override
void
OnEnter(AIAgent owner)
21
{
22
GetVariableIn
(PORT_ENTITY_IN, m_pFollowedEntity);
23
if
(!m_pFollowedEntity)
24
{
25
m_pFollowedEntity = owner.GetParentGroup();
26
}
27
28
m_pMyMovementComponent = owner.GetMovementComponent();
29
if
(!m_pMyMovementComponent)
30
return
;
31
32
setupResult = m_pMyMovementComponent.RequestFollowPathOfEntity(m_pFollowedEntity);
33
}
34
35
override
ENodeResult
EOnTaskSimulate(AIAgent owner,
float
dt)
36
{
37
if
(!m_pMyMovementComponent || !setupResult)
38
return
ENodeResult
.FAIL;
39
40
if
(m_pMyMovementComponent.HasCompletedRequest(
true
))
41
return
ENodeResult
.SUCCESS;
42
return
ENodeResult
.RUNNING;
43
}
44
45
protected
static
ref
TStringArray
s_aVarsIn
= {
46
PORT_ENTITY_IN
47
};
48
override
TStringArray
GetVariablesIn
()
49
{
50
return
s_aVarsIn
;
51
}
52
};
ChimeraCharacter
Definition
ChimeraCharacter.c:13
GenericEntity
Definition
GenericEntity.c:16
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
Node::VisibleInPalette
bool VisibleInPalette()
SCR_AIActionTask
Definition
SCR_AIBehaviorTask.c:2
SCR_AIFollowEntityPath
Definition
SCR_AIFollowEntityPath.c:6
SCR_AIFollowEntityPath::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIFollowEntityPath.c:48
SCR_AIFollowEntityPath::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AIFollowEntityPath.c:45
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Behavior
SCR_AIFollowEntityPath.c
Generated by
1.17.0