Page MenuHomeFeedback Tracker

Add scripting command to add/remove weapons to/from turrets
Reviewed, WishlistPublic

Description

Currently the addWeapon and removeWeapon commands only operate on the weapons array. This array always operates on turret 0 in the case of turreted vehicles. It is not possible (as far as I can determine?) to have them operate on different turrets if those are present on the vehicle, even though they each have their own weapons array.

I would like to propose that you add the possibility to manipulate the weapons on turrets.

Details

Legacy ID
1774805226
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Feature Request
Additional Information

I would like to propose that you add a either:
option A: (preferred) make turrets editable and retrievable through <vehicle|turret> getTurrets returning an array with the turrets as objets, which then can be used with a modified <turret> addWeapon weaponName<string>/removeWeapon weaponName<string> that accepts turrets. child turrets of a turret should be left out, but it should be possible to ask a turret to get it's child turrets with the getTurrets command.

option B: (probably a bit easier to implement?) add a 2nd syntax option to the addWeapon and removeWeapon commands specifying the turret path. This could alternatively be done through a command like "vehicle addWeaponTurret [turretpath<array>, weaponName<string>]" and "removeWeaponTurret [turretpath<array>, weaponName<string>]
Both boil down to the same thing. The same can be said for the magazine commands, which have been added with the longer name while overloading could have been used.

This issue is even more puzzling to me because read access is already in place for weapons on turrets but write access is not, while on the other hand it is possible for magazines in turrets.

Event Timeline

ocf81 edited Steps To Reproduce. (Show Details)Apr 29 2014, 12:59 AM
ocf81 edited Additional Information. (Show Details)
ocf81 set Category to Feature Request.
ocf81 set Reproducibility to N/A.
ocf81 set Severity to None.
ocf81 set Resolution to Open.
ocf81 set Legacy ID to 1774805226.May 7 2016, 6:30 PM

Unless there is already a way to do this these commands would be really helpful. People have apparently been wanting it for a long time (earliest request I could find was nearly 6 years old).