Firing Mode
The FiringMode sets how many shots each trigger pull fires: one, a burst, or as many as the trigger is held for. It is a barrel modifier: add it to the same GameObject as any barrel. The weapon and the barrel don’t know about firing modes: all of that logic lives here.
Add Component: Glowing Rifts > Modular Weapon > Firing Mode
⚙️ How It Works
- Semi Automatic fires one shot per trigger pull.
- Burst fires Burst Count shots per pull. The burst finishes even if the trigger is let go.
- Full Automatic keeps firing while the trigger is held.
- Shots are spaced by the barrel’s Fire Rate.
- After a semi or burst pull, the barrel stops shooting and raises On End Shooting.
- A pull before the last shot’s cooldown (1 / Fire Rate) is over is ignored.
- Keeping the trigger held doesn’t fire again, even after an auto reload. Release and pull again.
Note
Without a Firing Mode, a barrel fires full automatic. The old Shooting Mode of the barrel’s Config has moved here.
📐 Inspector Overview
| Field | Description |
|---|---|
| Mode | SemiAutomatic, Burst or FullAutomatic. |
| Burst Count | Shots per burst. |
💻 Scripting
using GlowingRifts.ModularWeaponSystem;
// Switch the barrel to burst
barrel.GetComponent<FiringMode>().mode = ShootingMode.Burst;Tip
Combine it with a Spool for a burst or semi-automatic weapon that charges before each pull.