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_AISettingsComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/AI"
, description:
"Component for utility AI system calculations"
)]
2
class
SCR_AISettingsComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
// Obsolete and should be removed eventually
7
class
SCR_AISettingsComponent :
ScriptComponent
8
{
9
// rewrite if condition below if adding new lines!!!
10
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Enable debug visualization"
)]
11
protected
bool
m_EnableVisualization;
12
13
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow movement"
)]
14
bool
m_EnableMovement
;
15
16
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow reacting on danger events"
)]
17
bool
m_EnableDangerEvents
;
18
19
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow reacting on perceived targets"
)]
20
bool
m_EnablePerception
;
21
22
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow shooting and attacking in general"
)]
23
bool
m_EnableAttack
;
24
25
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow finding and taking cover"
)]
26
bool
m_EnableTakeCover
;
27
28
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow aiming and gestures in general"
)]
29
bool
m_EnableLooking
;
30
31
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow sending messages"
)]
32
bool
m_EnableCommunication
;
33
34
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow artificial aiming error for AI"
)]
35
bool
m_EnableAimError
;
36
37
[
Attribute
(defvalue:
"0"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"Allow leader to stop when formation is deformed"
)]
38
bool
m_EnableLeaderStop
;
39
40
[
Attribute
(defvalue:
""
, uiwidget:
UIWidgets
.EditBox,
desc
:
"Title for world description"
)]
41
protected
string
m_sDescriptionTitle
;
42
43
[
Attribute
(defvalue:
""
, uiwidget:
UIWidgets
.EditBox,
desc
:
"World description"
)]
44
protected
string
m_sDescriptionText
;
45
46
private
Widget
m_wHint;
47
private
Widget
m_wOverlay;
48
49
protected
SCR_AIDebugInfoComponent
m_UIComponent
;
50
protected
static
SCR_AISettingsComponent m_sInstance;
51
52
//------------------------------------------------------------------------------------------------
54
static
SCR_AISettingsComponent GetInstance()
55
{
56
return
m_sInstance;
57
}
58
59
//------------------------------------------------------------------------------------------------
61
void
InitVisualization
()
62
{
63
if
(!m_EnableVisualization)
64
return
;
65
66
GetGame
().GetCallqueue().CallLater(
UpdateDebug
,10,
true
);
67
68
// Create debug layout
69
WorkspaceWidget
workspace =
GetGame
().GetWorkspace();
70
m_wOverlay = workspace.CreateWidgets(
"{7C4EE3995E17845B}UI/layouts/Debug/AIInfoDebug.layout"
);
71
if
(m_wOverlay.GetNumHandlers() > 0)
72
m_UIComponent
=
SCR_AIDebugInfoComponent
.Cast(m_wOverlay.GetHandler(0));
73
74
if
(
m_sDescriptionText
!=
string
.Empty ||
m_sDescriptionTitle
!=
string
.Empty)
75
SCR_HintManagerComponent.ShowCustomHint(
m_sDescriptionText
,
m_sDescriptionTitle
, 12);
76
}
77
78
//------------------------------------------------------------------------------------------------
80
protected
void
UpdateDebug
()
81
{
82
if
(!m_EnableVisualization)
83
return
;
84
85
m_UIComponent
.UpdateUI();
86
}
87
88
//------------------------------------------------------------------------------------------------
89
override
void
OnPostInit
(
IEntity
owner)
90
{
91
super.OnPostInit(owner);
92
m_sInstance =
this
;
93
#ifdef AI_DEBUG
94
if
(m_EnableVisualization)
95
InitVisualization
();
96
#endif
97
}
98
99
//------------------------------------------------------------------------------------------------
100
// destructor
101
void
~SCR_AISettingsComponent
()
102
{
103
if
(m_wOverlay)
104
m_wOverlay.RemoveFromHierarchy();
105
106
if
(m_wHint)
107
m_wHint.RemoveFromHierarchy();
108
}
109
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
m_EnableTakeCover
bool m_EnableTakeCover
Definition
SCR_AIConfigComponent.c:25
m_EnableLooking
bool m_EnableLooking
Definition
SCR_AIConfigComponent.c:28
m_EnableLeaderStop
bool m_EnableLeaderStop
Definition
SCR_AIConfigComponent.c:34
m_EnableAttack
bool m_EnableAttack
Definition
SCR_AIConfigComponent.c:22
m_EnableDangerEvents
bool m_EnableDangerEvents
Definition
SCR_AIConfigComponent.c:16
m_EnablePerception
bool m_EnablePerception
Definition
SCR_AIConfigComponent.c:19
m_EnableMovement
bool m_EnableMovement
Definition
SCR_AIConfigComponent.c:13
m_EnableCommunication
bool m_EnableCommunication
Definition
SCR_AIConfigComponent.c:31
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
~SCR_AISettingsComponent
void ~SCR_AISettingsComponent()
Definition
SCR_AISettingsComponent.c:101
m_UIComponent
SCR_AIDebugInfoComponent m_UIComponent
Definition
SCR_AISettingsComponent.c:49
m_sDescriptionTitle
string m_sDescriptionTitle
Definition
SCR_AISettingsComponent.c:41
InitVisualization
void InitVisualization()
Definition
SCR_AISettingsComponent.c:61
m_EnableAimError
bool m_EnableAimError
Definition
SCR_AISettingsComponent.c:35
m_sDescriptionText
string m_sDescriptionText
Definition
SCR_AISettingsComponent.c:44
UpdateDebug
void UpdateDebug()
Definition
SCR_AISettingsComponent.c:80
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntity
Definition
IEntity.c:13
SCR_AIDebugInfoComponent
Definition
SCR_AIDebugInfoComponent.c:2
SCR_AISettingsComponentClass
Definition
SCR_AISettingsComponent.c:3
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
WorkspaceWidget
Definition
WorkspaceWidget.c:16
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnPostInit
@ OnPostInit
Definition
SndComponentCallbacks.c:15
scripts
Game
AI
Components
SCR_AISettingsComponent.c
Generated by
1.17.0