ammo_* entities

Ammo entities #

Ammo entities share the ammo_ prefix in their name and same parameters.

The list of ammo entities #

Entity classnameAmmo typeDefault amount
ammo_9mmclip9mm17
ammo_9mmAR9mm50
ammo_9mmbox9mm200
ammo_ARgrenadesARgrenades2
ammo_buckshotbuckshot12
ammo_3573576
ammo_rpgcliprockets1 (2 in multiplayer)
ammo_gaussclipuranium20
ammo_crossbowbolts5
ammo_55655650
ammo_7627625
ammo_45acp45acp30
ammo_57mm57mm30
ammo_nailsnails30
ammo_grenadeclipgrenades6
ammo_fuelfuel100
ammo_cellscells100
ammo_chargescharges10
ammo_roundsrounds200
ammo_slugsslugs100

There’s also the ammo_spore but despite sharing the classname prefix, it technically is not a pickup item.

See also: ammo types

Configuration #

Some aspects of ammo entities can be configured via Entity templates.

Model #

E.g. ammo_45acp, ammo_57mm and ammo_nails entities share the model with ammo_9mmAR by default. To change this you may use entity templates:

{
    "ammo_45acp": {
        "own_visual": {
            "model": "models/w_45acp.mdl"
        }
    },
    "ammo_57mm": {
        "own_visual": {
            "model": "models/w_57mm.mdl"
        }
    }
}

Pickup sound #

The pickup sound for the specific ammo entity can be changed via entity templates with the custom Ammo.Pickup soundscript.

{
    "ammo_buckshot": {
        "soundscripts": {
            "Ammo.Pickup": {
                "waves": ["weapons/lock4.wav"]
            }
        }
    }
}

Ammo amount #

The ammo amount provided by the specific ammo entity by default can be changed via the features/ammo_amounts.cfg file.

Example:

ammo_gaussclip 25
ammo_556 100

New parameters #

  • Custom Model - custom model for the entity instance.
  • Custom amount - custom ammo amount provided for the player on picking up.
  • Gravity Setting
    • Unmoveable
    • Fall to the ground (default)
    • Hover in the air
    • Hover in the air, ignore brush collision
  • Master - block picking up until master is activated.

New spawnflags #

  • TOUCH Only - can be picked up only by touching.
  • USE Only - can be picked up only by pressing +use on it.

Server cvars #

  • mp_ammo_respawndelay - delay before ammo entity respawns in multiplayer game. -2 means default (which is 20 seconds in Half-Life). -1 means never respawn.