Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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)]
5
6class SCR_TurretControllerComponent : TurretControllerComponent
7{
8 //------------------------------------------------------------------------------------------------
9 override void OnPrepareControls(IEntity owner, ActionManager am, float dt, bool player)
10 {
11 if (player && IsWeaponADS())
12 {
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}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
event void OnPrepareControls()
ActionManager holds information about states of registered Contexts and Actions.
HYBRID_COMPONENT_ICON
Default icon for all components written in script that don't inherit ScriptComponent.
proto external bool IsWeaponADS()
proto external SightsComponent GetCurrentSights()