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_AISetCarHandBrake.c
Go to the documentation of this file.
1
class
SCR_AISetCarHandBrake
:
AITaskScripted
2
{
3
[
Attribute
(
"0"
,
UIWidgets
.CheckBox)]
4
protected
bool
m_bValue
;
5
6
protected
static
const
string
PORT_VEHICLE
=
"Vehicle"
;
7
8
//--------------------------------------------------------------------------------
9
override
ENodeResult
EOnTaskSimulate
(AIAgent owner,
float
dt)
10
{
11
IEntity
ent;
12
if
(!
GetVariableIn
(
PORT_VEHICLE
, ent))
13
return
ENodeResult
.FAIL;
14
15
if
(!ent)
16
return
ENodeResult
.FAIL;
17
18
CarControllerComponent
carController =
CarControllerComponent
.Cast(ent.
FindComponent
(
CarControllerComponent
));
19
20
if
(!carController)
21
return
ENodeResult
.FAIL;
22
23
carController.SetPersistentHandBrake(
m_bValue
);
24
25
return
ENodeResult
.SUCCESS;
26
}
27
28
//--------------------------------------------------------------------------------
29
protected
static
ref
TStringArray
s_aVarsIn
= {
30
PORT_VEHICLE
31
};
32
override
TStringArray
GetVariablesIn
()
33
{
34
return
s_aVarsIn
;
35
}
36
37
//--------------------------------------------------------------------------------
38
static
override
bool
VisibleInPalette
()
39
{
40
return
true
;
41
}
42
43
//--------------------------------------------------------------------------------
44
static
override
string
GetOnHoverDescription
()
45
{
46
return
"Sets handbrake value of a car."
;
47
}
48
};
AITaskScripted
Definition
AITaskScripted.c:13
CarControllerComponent
Definition
CarControllerComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AISetCarHandBrake
Definition
SCR_AISetCarHandBrake.c:2
SCR_AISetCarHandBrake::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AISetCarHandBrake.c:44
SCR_AISetCarHandBrake::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AISetCarHandBrake.c:38
SCR_AISetCarHandBrake::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AISetCarHandBrake.c:29
SCR_AISetCarHandBrake::PORT_VEHICLE
static const string PORT_VEHICLE
Definition
SCR_AISetCarHandBrake.c:6
SCR_AISetCarHandBrake::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AISetCarHandBrake.c:32
SCR_AISetCarHandBrake::m_bValue
bool m_bValue
Definition
SCR_AISetCarHandBrake.c:4
SCR_AISetCarHandBrake::EOnTaskSimulate
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
Definition
SCR_AISetCarHandBrake.c:9
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
Vehicles
SCR_AISetCarHandBrake.c
Generated by
1.17.0