Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SetSmartActionReserved.c
Go to the documentation of this file.
1
class
SCR_AISetSmartActionReserved
:
AITaskScripted
2
{
3
static
const
string
SMART_ACTION_PORT =
"SmartActionIn"
;
4
static
const
string
OWNER_PORT =
"OwnerAgentIn"
;
5
6
//----------------------------------------------------------------------------------------------------------------------------------------------
7
override
ENodeResult
EOnTaskSimulate(AIAgent owner,
float
dt)
8
{
9
SCR_AISmartActionComponent
smartActionComponent;
10
AIAgent ownerAgent;
11
12
if
(!
GetVariableIn
(SMART_ACTION_PORT, smartActionComponent))
13
return
NodeError
(
this
, owner,
"No smartaction to reserve!"
);
14
if
(!
GetVariableIn
(OWNER_PORT, ownerAgent))
15
ownerAgent = owner;
16
17
smartActionComponent.
ReserveAction
(ownerAgent);
18
return
ENodeResult
.SUCCESS;
19
}
20
21
//----------------------------------------------------------------------------------------------------------------------------------------------
22
protected
static
ref
TStringArray
s_aVarsIn
= {
23
OWNER_PORT,
24
SMART_ACTION_PORT
25
};
26
27
//----------------------------------------------------------------------------------------------------------------------------------------------
28
override
TStringArray
GetVariablesIn
()
29
{
30
return
s_aVarsIn
;
31
};
32
33
//----------------------------------------------------------------------------------------------------------------------------------------------
34
static
override
bool
VisibleInPalette
()
35
{
36
return
true
;
37
};
38
39
//----------------------------------------------------------------------------------------------------------------------------------------------
40
static
override
string
GetOnHoverDescription
()
41
{
42
return
"SetSmartActionInaccessible: makes the smart action reserved for other AIs, it is released when performActionBehavior completes/ fails."
;
43
};
44
};
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition
NodeError.c:3
AITaskScripted
Definition
AITaskScripted.c:13
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AISetSmartActionReserved
Definition
SetSmartActionReserved.c:2
SCR_AISetSmartActionReserved::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SetSmartActionReserved.c:22
SCR_AISetSmartActionReserved::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SetSmartActionReserved.c:28
SCR_AISetSmartActionReserved::VisibleInPalette
static override bool VisibleInPalette()
Definition
SetSmartActionReserved.c:34
SCR_AISetSmartActionReserved::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SetSmartActionReserved.c:40
SCR_AISmartActionComponent
Definition
SCR_AISmartActionComponent.c:10
SCR_AISmartActionComponent::ReserveAction
void ReserveAction(AIAgent owner)
Definition
SCR_AISmartActionComponent.c:18
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Soldier
SetSmartActionReserved.c
Generated by
1.17.0