there's currently no straight-forward way of discovering which pylon was used when firing a weapon from a vehicle that uses dynamic loadouts, for example.
a PylonIndex passed down by the EH would greatly help in such cases.
There's workarounds for sure, such as comparing previous ammo counts or using _magazine to find the pylons, which isn't perfect as a vehicle can have multiple pylons that use the same kind of magazine.