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_AIDecoTestIsInTurret.c
Go to the documentation of this file.
1
class
SCR_AIDecoTestIsInTurret
:
DecoratorTestScripted
2
{
3
// this tests if Entity is in turret
4
protected
override
bool
TestFunction
(AIAgent agent,
IEntity
controlled)
5
{
6
if
(!controlled)
7
controlled = agent.GetControlledEntity();
8
ChimeraCharacter
character =
ChimeraCharacter
.Cast(controlled);
9
if
(!character)
10
return
false
;
11
SCR_CompartmentAccessComponent
compAcc =
SCR_CompartmentAccessComponent
.Cast(character.GetCompartmentAccessComponent());
12
if
(!compAcc)
13
return
false
;
14
if
(!compAcc.IsInCompartment())
15
return
false
;
16
return
TurretCompartmentSlot
.Cast(compAcc.GetCompartment());
17
}
18
};
ChimeraCharacter
Definition
ChimeraCharacter.c:13
DecoratorTestScripted
Definition
DecoratorTestScripted.c:13
IEntity
Definition
IEntity.c:13
SCR_AIDecoTestIsInTurret
Definition
SCR_AIDecoTestIsInTurret.c:2
SCR_AIDecoTestIsInTurret::TestFunction
override bool TestFunction(AIAgent agent, IEntity controlled)
Definition
SCR_AIDecoTestIsInTurret.c:4
SCR_CompartmentAccessComponent
Definition
SCR_CompartmentAccessComponent.c:16
TurretCompartmentSlot
Definition
TurretCompartmentSlot.c:13
scripts
Game
AI
ScriptedNodes
Vehicles
SCR_AIDecoTestIsInTurret.c
Generated by
1.17.0