ModularFirearmDrop MonoBehaviour
Overview
The ModularFirearmDrop is spawned when a character drops their current firearm. It acts as an interactive pickup for other characters to pick it up, and manages the magazine ammo as a separate pickup. You can optionally add custom payload data to the drop and specify the magazine ammo count and attachments for the firearm. If the drop is spawned by the player character dropping the item from their inventory, then the payload data will be based on the setup of the firearm that was dropped, not the settings in the inspector.
Inspector

Properties
The ModularFirearmDrop inherits from the FpsInventoryWieldableDrop. Check the reference for information on its properties.
| Name | Type | Description |
|---|---|---|
| Ammo Pickup | ModularFirearmAmmoPickup | The ammo pickup for this weapon's magazine. |
| Ammo Pickup Delay | Float | The delay from dropping before the ammo pickup becomes active (prevents the dropper from instantly grabbing ammo). |
| Has Custom Payload Data | Boolean | Does this drop have custom payload data for specifying ammo and/or attachments. The properties below will only be visible if this is true. |
| Ammo Count Method | Float | How should the ammo count be calculated. |
| Ammo Count | Float | The amount of ammo to set for the gun's magazine count on pick up. This property will only be visible if Ammo Count Method is set to Fixed Value. |
| Ammo Min | Float | The minimum amount (inclusive) of ammo to set for the gun's magazine count on pick up. This property will only be visible if Ammo Count Method is set to Random. |
| Ammo Max | Float | The maximum amount (inclusive) of ammo to set for the gun's magazine count on pick up. This property will only be visible if Ammo Count Method is set to Random. |
| Attachments | Attachments Array | The attachments that should be set on the firearm on pickup. |
The entries in the Attachments array have the following properties.
| Name | Type | Description |
|---|---|---|
| Socket Name | String | The name of the socket the attachment should be applied to. This must match the socket name assigned in the ModularFirearmAttachmentSocket component on the gun. |
| Attachment | Attachment | The attachment prefab to attach to this socket. This must have a component that inherits from the ModularFirearmAttachment base class, such as the StandardModularFirearmAttachment behaviour. |