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_TurretControllerComponent.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Turret"
, description:
"Scripted turret controller"
, icon:
HYBRID_COMPONENT_ICON
)]
2
class
SCR_TurretControllerComponentClass
:
TurretControllerComponentClass
3
{
4
}
5
6
class
SCR_TurretControllerComponent :
TurretControllerComponent
7
{
8
//------------------------------------------------------------------------------------------------
9
override
void
OnPrepareControls
(
IEntity
owner,
ActionManager
am,
float
dt,
bool
player)
10
{
11
if
(player &&
IsWeaponADS
())
12
{
13
BaseSightsComponent
sights =
GetCurrentSights
();
14
if
(sights)
15
{
16
SCR_SightsZoomFOVInfo
fovInfo =
SCR_SightsZoomFOVInfo
.Cast(sights.GetFOVInfo());
17
if
(fovInfo && fovInfo.
GetStepsCount
() > 1)
18
am.ActivateContext(
"TurretWeaponMagnificationContext"
);
19
}
20
}
21
}
22
}
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
OnPrepareControls
event void OnPrepareControls()
Definition
SCR_HelicopterControllerComponent.c:72
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
ActionManager
ActionManager holds information about states of registered Contexts and Actions.
Definition
ActionManager.c:14
BaseSightsComponent
Definition
BaseSightsComponent.c:13
IEntity
Definition
IEntity.c:13
SCR_SightsZoomFOVInfo
Definition
SCR_SightsZoomFOVInfo.c:7
SCR_SightsZoomFOVInfo::GetStepsCount
int GetStepsCount()
Definition
SCR_SightsZoomFOVInfo.c:133
SCR_TurretControllerComponentClass
Definition
SCR_TurretControllerComponent.c:3
TurretControllerComponentClass
Definition
TurretControllerComponentClass.c:13
TurretControllerComponent
Definition
TurretControllerComponent.c:13
HYBRID_COMPONENT_ICON
HYBRID_COMPONENT_ICON
Default icon for all components written in script that don't inherit ScriptComponent.
IsWeaponADS
proto external bool IsWeaponADS()
GetCurrentSights
proto external SightsComponent GetCurrentSights()
scripts
Game
Components
SCR_TurretControllerComponent.c
Generated by
1.17.0