Bullet Magazine

The BulletMagazine is a classic ammo system used in most traditional firearms. It inherits from the base Magazine component and introduces functionality for reloading, both manually and automatically.

This magazine tracks a finite number of bullets (the clip) and requires a reload when empty. It also exposes events for integrating reload animations, sounds, VFX and more.

✅ Ideal For

  • Pistols
  • Assault rifles
  • SMGs
  • Shotguns

⚙️ How It Works

  • The barrel checks if there is at least 1 bullet left in the clip.
  • When a shot is fired, the clip value is decremented.
  • If the clip reaches zero:
    • The On Depleted event is triggered.
    • If Auto Reload is enabled, the reload process begins.
  • When a reload is triggered, the On Start Reload and On Reload Complete events fire in sequence.

📐 Inspector Overview

FieldDescription
ClipCurrent number of bullets available
Clip SizeMaximum capacity of the magazine
On DepletedEvent triggered when the clip reaches zero
On Start ReloadInvoked at the start of a reload sequence
On Reload CompleteCalled when the reload finishes and the clip is refilled
Auto ReloadIf enabled, reloads automatically when the clip is empty
Reload TimeTime in seconds required to complete a reload
ReloadableIf disabled, the magazine cannot be reloaded (useful for disposable or one-time weapons)

🎮 Integration Tips

  • Hook On Start Reload to reload animations or sound effects.
  • Use On Reload Complete to reset visuals or play reload confirmation sounds.
  • Combine with HUD elements to show remaining bullets in the clip.
  • try to sync the reload time with the animation’s length