Skip to content

Custom Weapon Events

wootguy edited this page May 23, 2026 · 5 revisions

Events work similarly to animation events in weapon models. The difference is you have far more event types and trigger conditions available. There is a limit to how many events a weapon can have to keep network data small. Check the console for errors when picking up the weapon.

Below is the syntax for an event section header:

[ $\color{#00dd00}{event}$ . $\color{#ff0000}{condition}$ . $\color{#00ffff}{type}$]

$\color{#00dd00}{event}$ = This section defines an event trigger. This is always "event".
$\color{#ff0000}{condition}$ = The condition which triggers the event. See Event Conditions for valid values.
$\color{#00ffff}{type}$ = The type of event that will be triggered. See Event Types for valid values.

Event Conditions

Conditions describe when the event will trigger.

Condition Description
primary_attack
secondary_attack
tertiary_attack
primary_alt_attack
Trigger when an attack begins, unless the attack fails (underwater, no ammo).
priamry_clip_is_X
secondary_clip_is_X
Trigger when the clip is set to X after an attack. X = 0-31
primary_clip_is_odd
secondary_clip_is_odd
Trigger when the clip is an odd number after an attack.
primary_clip_is_even
secondary_clip_is_even
Trigger when the clip is an even number after an attack.
primary_clip_is_not_empty
secondary_clip_is_not_empty
Trigger when the clip is not 0 after an attack.
primary_attack_charge
secondary_attack_charge
Trigger when the attack begins charging. Delayed events are cancelled when charging stops or fails.
primary_attack_overcharge
secondary_attack_overcharge
Trigger when the attack is overcharged. Overcharge time is configured in [primary_attack] / [secondary_attack] (link).
primary_attack_start
secondary_attack_start
Trigger once when an attack starts. Does not trigger again until the attack button is released and pressed again.
primary_attack_stop
secondary_attack_stop
Trigger when an attack finishes or fails.
primary_attack_fail
secondary_attack_fail
Trigger when the attack fails (underwater, no ammo).
reload Trigger when a reload begins.
reload_empty Trigger when a reload begins with an empty clip.
reload_not_empty Trigger when a reload begins with a non-empty clip.
reload_finish Trigger when a reload finishes.
deploy Trigger when the weapon is deployed.
bullet_fired Trigger after a bullet is fired. Can be used to ensure things like recoil events don't affect the bullet accuracy.
laser_on Trigger when the laser is turned on.
laser_off Trigger when the laser is turned off.
zoom_in Trigger when activating the scope.
zoom_out Trigger when deactivating the scope.
impact_primary_any
impact_secondary_any
impact_tertiary_any
impact_primary_alt_any
Trigger when a bullet/projectile/beam impacts anything. The event position is set to the point of impact.
impact_primary_world
impact_secondary_world
impact_tertiary_world
impact_primary_alt_world
Trigger when a bullet/projectile/beam impacts the world. The event position is set to the point of impact.
impact_primary_monster
impact_secondary_monster
impact_tertiary_monster
impact_primary_alt_monster
Trigger when a bullet/projectile/beam impacts a monster. The event position is set to the point of impact.

Clone this wiki locally