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_AIDrawDebugSphere.c
Go to the documentation of this file.
1
class
SCR_AIDrawDebugSphere
:
AITaskScripted
2
{
3
static
const
string
PORT_ORIGIN =
"OriginIn"
;
4
static
const
string
PORT_RADIUS =
"RadiusIn"
;
5
6
[
Attribute
(
"1"
,
UIWidgets
.EditBox,
desc
:
"Radius of sphere"
)]
7
private
float
m_fRadius;
8
9
[
Attribute
(
"0.18 0.80 0.44 1"
,
UIWidgets
.ColorPicker,
desc
:
"Color of sphere"
)]
10
private
ref
Color
m_Color;
11
12
ref
Shape
sphere;
13
14
//------------------------------------------------------------------------------------------------
15
protected
static
ref
TStringArray
s_aVarsIn
= {
16
PORT_ORIGIN,
17
PORT_RADIUS
18
};
19
override
TStringArray
GetVariablesIn
()
20
{
21
return
s_aVarsIn
;
22
}
23
24
//------------------------------------------------------------------------------------------------
25
static
override
bool
VisibleInPalette
()
26
{
27
return
true
;
28
}
29
30
//------------------------------------------------------------------------------------------------
31
override
ENodeResult
EOnTaskSimulate
(AIAgent owner,
float
dt)
32
{
33
#ifdef WORKBENCH
34
if
(
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_AI_SHOW_DEBUG_SHAPES))
35
{
36
vector
position
;
37
float
radius;
38
int
color;
39
40
GetVariableIn
(PORT_ORIGIN,
position
);
41
if
(!
GetVariableIn
(PORT_RADIUS, radius))
42
radius = m_fRadius;
43
if
(m_Color)
44
color =m_Color.PackToInt();
45
else
46
color =
COLOR_GREEN_A
;
47
sphere =
Shape
.CreateSphere(color,
ShapeFlags
.TRANSP |
ShapeFlags
.NOOUTLINE,
position
, radius);
48
}
49
#endif
50
return
ENodeResult
.SUCCESS;
51
}
52
53
//------------------------------------------------------------------------------------------------
54
protected
static
override
string
GetOnHoverDescription
()
55
{
56
return
"Draws a sphere of given radius"
;
57
}
58
};
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
AITaskScripted
Definition
AITaskScripted.c:13
Color
Definition
Color.c:13
DiagMenu
Diagnostic and developer menu system.
Definition
DiagMenu.c:18
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AIDrawDebugSphere
Definition
SCR_AIDrawDebugSphere.c:2
SCR_AIDrawDebugSphere::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIDrawDebugSphere.c:19
SCR_AIDrawDebugSphere::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIDrawDebugSphere.c:25
SCR_AIDrawDebugSphere::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AIDrawDebugSphere.c:15
SCR_AIDrawDebugSphere::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDrawDebugSphere.c:54
SCR_AIDrawDebugSphere::EOnTaskSimulate
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
Definition
SCR_AIDrawDebugSphere.c:31
Shape
Instance of created debug visualizer.
Definition
Shape.c:14
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
COLOR_GREEN_A
const int COLOR_GREEN_A
Definition
constants.c:27
ShapeFlags
ShapeFlags
Definition
ShapeFlags.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Debug
SCR_AIDrawDebugSphere.c
Generated by
1.17.0