Page MenuHomeFeedback Tracker

Overwrting the Turret Elevation and Rotation limits
Closed, ResolvedPublic

Description

To have more options for placing turrets indoors, we need a script commands to limit the rotation of turrets horizontally and vertically so that the player and AI cannot turn so much that their body models come out from the wall

// → Vanilla config values **class HMG_02**
minTurn=-360;
maxTurn=360;
minElev=-8;
maxElev=35;

see YT video demostration

// → to get config values
// the same as (configfile>>"CfgVehicles">>_turret>>"Turrets">>"MainTurret">>"maxTurn");
_turretTurnLimits = getTurnTurretLimits _turret; //---result [360, -360]
_turretElevLimits = getElevTurretLimits _turret; //---result [35, -8]

// → need overwrite config values
_turret setTurnTurretLimits [180, -180];
_turret setElevTurretLimits [10, -5];

// → get current turn and elevation value
// well the same as (deg (_turret animationPhase "mainturret")) or (deg (_turret animationPhase "maingun"))
_turretTurn = getTurnTurret _turret; //---result 49.9559
_turretElev = getElevTurret _turret; //---result  14.1017

Details

Severity
Feature
Resolution
Fixed
Reproducibility
N/A
Operating System
Windows 10 x64
Operating System Version
win11 21H2
Category
Feature Request

Event Timeline

TRAGER created this task.Apr 27 2022, 11:50 AM
TRAGER renamed this task from Command Request - set(get)TurnTurret && set(get)ElevTurret to Command Request - set(get)TurnTurret / set(get)ElevTurret .Aug 12 2022, 9:12 AM
TRAGER updated the task description. (Show Details)
h- added a subscriber: h-.Aug 13 2022, 8:39 AM
TRAGER renamed this task from Command Request - set(get)TurnTurret / set(get)ElevTurret to Overwrting the Turret Elevation and Rotation limits.Jan 2 2023, 10:29 AM
TRAGER updated the task description. (Show Details)
TRAGER edited Additional Information. (Show Details)
This comment was removed by BIS_fnc_KK.
This comment was removed by BIS_fnc_KK.
This comment was removed by BIS_fnc_KK.
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jan 10 2023, 7:09 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

Comands works fine in RC 2.12.150301, JIP, dedi server
Can be closed, thanks!

BIS_fnc_KK closed this task as Resolved.Feb 14 2023, 12:24 PM
BIS_fnc_KK changed Resolution from Open to Fixed.