Page MenuHomeFeedback Tracker

[Feature request] Return assigned turretpath of pylons
Assigned, NormalPublic

Description

Currently there is no way to determine what pylon on a vehicle is assigned to what turret when using dynamic loadouts. https://community.bistudio.com/wiki/getPylonMagazines merely lists the magazines each pylon has attached, but not the turret. I can see two ways of resolving this, either adding a new command that lists each pylon in order like with getPylonMagazines, but just lists turretpaths the pylons are assigned to, or adding the turretpath to the getPylonMagazines command with an extra variable to enable the turretpath listing so you don't break compatibility with old scripts.

new command way:
getPylonTurrets
Description: Return array of turretpaths on pylons

Syntax: getPylonTurrets vehicle

Parameters:
vehicle: Object

Return Value:
Array of Strings (turretpaths)

Example 1:
getPylonTurrets (vehicle player)
would return [[-1, [-1], [0], [0]] OR would return ["", "", [0], [0]]
(first two pylons assigned to pilot, second two assigned to gunner)

expand old command way:
Description: Return array of magazines on pylons

Syntax: getPylonMagazines vehicle
Parameters:
vehicle: Object

Alternative syntax: getPylonMagazines [vehicle, includeturrets]
Parameters:
vehicle: Object
includeturrets: Boolean, includes turretpath in return value

Return Value:
Array of Strings (magazine classnames)
Alternative Return Value:
Array of Arrays (["magazine classname", turretpath])

Example 1:
getPylonMagazines (vehicle player)
returns ["PylonRack_12Rnd_PG_missiles","PylonRack_12Rnd_PG_missiles","PylonRack_1Rnd_AAA_missiles","PylonRack_1Rnd_AAA_missiles"]

Example 2:
getPylonMagazines [(vehicle player), true]
would return [["PylonRack_12Rnd_PG_missiles"], ["PylonRack_12Rnd_PG_missiles"], ["PylonRack_1Rnd_AAA_missiles",[0]], ["PylonRack_1Rnd_AAA_missiles",[0]] (first and second pylon are assigned to pilot, third and fourth pylon assigned to gunner)

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Sekra created this task.Oct 5 2020, 3:30 AM
Sekra added a comment.Oct 8 2020, 4:22 AM

The need for this expanded functionality is when loadouts have changed during a mission with scripting, and those loadouts need to be read after the changes, for example when opening a loadout manager that works inside a running mission.

Sekra changed Severity from None to Feature.Oct 8 2020, 4:30 AM
BIS_fnc_KK changed the task status from New to Assigned.
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Nov 24 2020, 6:06 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.