WeaponMechanics
All WikisDownloadDonate
  • Home
  • Weapon Modules
    • Info
    • Shoot
      • Spread
      • Recoil
    • Scope
    • Reload
      • Ammo
    • Skin
    • Projectile
      • Sticky
      • Bouncy
      • Through
    • Explosion
      • Block Damage
    • Damage
      • Damage Modifiers
    • Firearm_Action
    • Melee
  • Trigger
  • Addons
  • Common Questions
  • Developer API
    • Cloning Repository
    • Projectile Scripts
  • 📄Articles
    • Optimizing Explosions
Powered by GitBook
On this page
  1. Weapon Modules

Firearm_Action

  Firearm_Action:
    Type: <FirearmType>
    Firearm_Action_Frequency: <use every x amount of shots>
    Open:
      Time: <ticks>
      Mechanics: <Mechanics>
    Close:
      Time: <ticks>
      Mechanics: <Mechanics>

Type

Defines how weapon's firearm actions will behave. There are 4 different firearm types. These firearm actions can add a layer of depth, especially if you have custom sounds for the firearm actions.

For most magazine-fed weapons, if a magazine is not empty, the magazine can simply be replaced without additional firearm actions.

  • When Shooting:

    • Weapon Fires

  • When Reloading

    • If empty

      • Weapon Opens (Pull the slide back, specifically for H&K weapons, AUG and others)

      • Weapon Reloads (Take out the magazine, insert new magazine)

      • Weapon Closes (Slide returns, a bullet is chambered)

    • If not empty

      • Weapon Reloads (Take out the magazine, insert new magazine)

For revolvers, the cylinder has to be pulled out so ammo can be loaded.

  • When Shooting:

    • Weapon Fires

  • When Reloading:

    • Weapon Opens (The rotating section pops out).

    • The reload-timer starts (Bullets are loaded into each slot).

    • Weapon Closes (The rotating section pops back in).

For pump-action weapons, a pump has to be cocked back and forth to eject and load a shell.

  • When Shooting:

    • Weapon Fires

    • Weapon Opens (Ejecting a shell)

    • Weapon Closes (Loading a shell)

  • When Reloading:

    • If empty

      • Weapon Reloads

      • Weapon Opens (If not already open, ejecting a shell)

      • Weapon Closes (Loading a shell)

    • If not empty

      • Weapon Reloads

For lever/bolt action weapons, a lever must be pulled then pushed to eject and load a round. Different from PUMP because the weapon MUST be opened before reloading.

  • When Shooting:

    • Weapon Fires

    • Weapon Opens (Ejecting a round)

    • Weapon Closes (Loading a round)

  • When Reloading:

    • If empty

      • Weapon Opens (Ejecting a round, and unlocking the mag)

      • Weapon Reloads

      • Weapon Closes (Loading a round, and blocking the mag)

    • If not empty

      • Weapon Reloads

When using firearm actions with different fire types

  • SINGLE -> After shot firearm actions are triggered

  • BURST -> After the burst is finished, firearm actions are triggered

  • AUTO -> After cancelling full-auto firearm actions are triggered

Firearm_Action_Frequency: <Integer>

Defines how often firearm actions are used.

If the current ammo amount after shooting is divisible by Firearm_Action_Frequency then firearm actions are triggered. For example, when Firearm_Action_Frequency: 2, firearm actions will be triggered if the weapon is shot and ammo left in its magazine is 18. If ammo left were 9, firearm actions wouldn't be triggered.

Open

  • Time

    • The time, in ticks, it takes to open the weapon.

  • Mechanics

    • Delayed sound plays will be cancelled if firearm actions are cancelled.

Close

  • Time

    • The time, in ticks, it takes to close the weapon.

  • Mechanics

    • Delayed sound plays will be cancelled if firearm actions are cancelled

Last updated 1 year ago

Use the wiki.

Use the wiki.

Mechanics
Mechanics