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_AIDebugTask.c
Go to the documentation of this file.
1
// base class for debug nodes. override PrintInternal in child class
2
class
SCR_AIDebugTask
:
AITaskScripted
3
{
4
[
Attribute
(
"0"
,
UIWidgets
.CheckBox,
"Message prefixed with ref to self"
)]
5
private
bool
m_bIncludeMe;
6
7
[
Attribute
(
""
,
UIWidgets
.EditBox,
"Message to show"
)]
8
private
string
m_sDebugMessage;
9
10
[
Attribute
(
"0"
,
UIWidgets
.CheckBox,
"Fail node after print?"
)]
11
protected
bool
m_bFailAfter
;
12
13
static
const
string
PORT_DEBUG_MESSAGE
=
"DebugMessage"
;
14
15
//------------------------------------------------------------------------------------------------
16
protected
static
ref
TStringArray
s_aVarsIn
= {
17
PORT_DEBUG_MESSAGE
18
};
19
override
TStringArray
GetVariablesIn
()
20
{
21
return
s_aVarsIn
;
22
}
23
24
// override this in child class
25
//------------------------------------------------------------------------------------------------
26
protected
void
PrintInternal
(
string
in)
27
{
28
}
29
30
//------------------------------------------------------------------------------------------------
31
override
ENodeResult
EOnTaskSimulate
(AIAgent owner,
float
dt)
32
{
33
//switch defines when neede to debug on server
34
//#ifdef AI_DEBUG
35
#ifdef WORKBENCH
36
string
prefix;
37
if
( m_bIncludeMe )
38
prefix = owner.ToString() +
": "
;
39
PrintInternal
(prefix + m_sDebugMessage +
SCR_AINodePortsHelpers
.GetStringFromPort(
this
,
PORT_DEBUG_MESSAGE
));
40
#endif
41
if
(
m_bFailAfter
)
42
return
ENodeResult
.FAIL;
43
else
44
return
ENodeResult
.SUCCESS;
45
}
46
47
//------------------------------------------------------------------------------------------------
48
static
override
bool
VisibleInPalette
()
49
{
50
return
false
;
51
}
52
53
//------------------------------------------------------------------------------------------------
54
override
string
GetNodeMiddleText
()
55
{
56
if
(
m_bFailAfter
)
57
return
"FAILS"
;
58
else
59
return
""
;
60
}
61
};
AITaskScripted
Definition
AITaskScripted.c:13
SCR_AIDebugTask
Definition
SCR_AIDebugTask.c:3
SCR_AIDebugTask::PORT_DEBUG_MESSAGE
static const string PORT_DEBUG_MESSAGE
Definition
SCR_AIDebugTask.c:13
SCR_AIDebugTask::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AIDebugTask.c:16
SCR_AIDebugTask::EOnTaskSimulate
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
Definition
SCR_AIDebugTask.c:31
SCR_AIDebugTask::GetNodeMiddleText
override string GetNodeMiddleText()
Definition
SCR_AIDebugTask.c:54
SCR_AIDebugTask::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIDebugTask.c:19
SCR_AIDebugTask::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIDebugTask.c:48
SCR_AIDebugTask::PrintInternal
void PrintInternal(string in)
Definition
SCR_AIDebugTask.c:26
SCR_AIDebugTask::m_bFailAfter
bool m_bFailAfter
Definition
SCR_AIDebugTask.c:11
SCR_AINodePortsHelpers
Definition
SCR_AIUtils.c:4
UIWidgets
Definition
attributes.c:40
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Debug
SCR_AIDebugTask.c
Generated by
1.17.0