-
Notifications
You must be signed in to change notification settings - Fork 2
weapon_custom
wootguy edited this page Jun 5, 2018
·
5 revisions
This entity is the base definition of your weapon. It will define a new weapon entity for you to place in your map or cfg. It doesn't spawn anything on its own, and you will need to attach at least one shoot entity for your weapon to be usable.
Keyvalue Value Type |
Description |
---|---|
_____________________________ | |
Name string |
Name of the entity (not the name of the weapon). |
Weapon Class string |
Name of your weapon. This is the new entity you'll place in your map or cfg. |
Default Ammo integer |
Amount of ammo to put in the clip when the weapon is first picked up. For weapons without a clip, this will be the starting ammo. Set to -1 to start with a full clip (or full ammo if no clip is used). |
Primary Fire weapon_custom_shoot |
Primary fire shoot settings. |
Primary Alternate Fire weapon_custom_shoot |
Primary alternate fire shoot settings. |
Primary Empty Sound weapon_custom_sound |
Sound played when attempting to fire without ammo or under water. |
Primary Clip Size integer |
Amount of ammo held in the primary clip. |
Primary Ammo Type string |
Ammo type used for primary fire. |
Primary Ammo Drop Class float |
Classname of entity to create when dropping primary ammo. If left blank, the smallest known ammo class is used. For example, if your weapon uses 9mm ammo, ammo_9mmclip will be the dropped ammo type. |
Primary Ammo Regen Time float |
Time in seconds for primary ammo to regenerate. |
Primary Ammo Regen Amount float |
Amount of primary ammo regenerated at each interval. |
Secondary Action integer |
What to do when the secondary fire button is pressed. |
Secondary Fire weapon_custom_shoot |
Secondary fire shoot settings. |
Secondary Empty Sound weapon_custom_sound |
Sound played when attempting to fire without ammo or under water. |
Secondary Clip Size integer |
Amount of ammo to put in the secondary clip when the weapon is first picked up. |
Secondary Default Ammo integer |
Amount of ammo held in the secondary clip. |
Secondary Ammo Type string |
Ammo type used for secondary fire. |
Secondary Ammo Drop Class float |
Classname of entity to create when dropping secondary ammo. If left blank, the smallest known ammo class is used. For example, if your weapon uses 9mm ammo, ammo_9mmclip will be the dropped ammo type. |
Secondary Ammo Regen Time float |
Time in seconds for secondary ammo to regenerate. |
Secondary Ammo Regen Amount float |
Amount of secondary ammo regenerated at each interval. |
Tertiary Action integer |
What to do when the tertiary fire button is pressed. |
Tertiary Fire weapon_custom_shoot |
Tertiary fire shoot settings. |
Tertiary Empty Sound weapon_custom_sound |
Sound played when attempting to fire without ammo or under water. |
Tertiary Ammo Type integer |
Ammo type used for tertiary fire. |
Max Live Projectiles integer |
Maximum projectiles allowed to exist at once. The weapon will not fire if the number of live projectiles is above this limit. 0 = no limit. |
V_Model string |
Default first-person model. |
P_Model string |
Default third-person model. |
W_Model string |
Default world model (weapon on ground). |
V_Model Body integer |
Default first-person sub-model/model body. |
Reload Mode integer |
Reload method. |
Reload Time float |
Total reload time when Reload Mode = Simple. Time between load stages when Reload Mode = Staged. Ignored when Reload Mode = Effect Chain. |
Reload Animation integer |
Reload animation when Reload Mode = Simple. Load stage animation when Reload Mode = Staged. Ignored when Reload Mode = Effect Chain. |
Reload Sound weapon_custom_sound |
Reload sound when Reload Mode = Simple. Load stage sound when Reload Mode = Staged. Ignored when Reload Mode = Effect Chain. |
Reload Empty Animation integer |
Animation played when reloading with no ammo left in clip. Ignored when Reload Mode = Effect Chain. |
Reload Staged Start Time float |
Duration (in seconds) of the reload start stage. |
Reload Staged Start Animation integer |
Animation played for the reload start stage. |
Reload Staged Start Sound weapon_custom_sound |
Sound played for the reload start stage. |
Reload Staged End Time float |
Duration (in seconds) of the reload end stage. |
Reload Staged End Animation integer |
Animation played for the reload end stage. |
Reload Staged End Sound weapon_custom_sound |
Sound played for the reload end stage. |
Reload Staged Cancel Time float |
Duration (in seconds) of the reload cancel stage. |
Reload Staged Cancel Animation integer |
Animation played for the reload cancel stage. |
Reload Staged Cancel Sound weapon_custom_sound |
Sound played for the reload cancel stage. |
Reload Staged Ammo Amount integer |
Amount of ammo replenished after each load stage. |
Reload User Effect weapon_custom_user_effect |
User effect triggered when a reload is started. |
Reload Empty User Effect weapon_custom_user_effect |
User effect triggered when a reload is started with no ammo left in the clip. |
Secondary Reload Mode integer |
Reload method for secondary clip. |
Secondary Reload Time float |
Total reload time when Secondary Reload Mode = Simple. Ignored when Secondary Reload Mode = Effect Chain. |
Secondary Reload Animation integer |
Reload animation when Secondary Reload Mode = Simple. Ignored when Secondary Reload Mode = Effect Chain. |
Secondary Reload Sound weapon_custom_sound |
Reload sound when Secondary Reload Mode = Simple. Ignored when Secondary Reload Mode = Effect Chain. |
Secondary Reload User Effect weapon_custom_user_effect |
User effect triggered when a reload is started. |
Deploy Time float |
Time in seconds for weapon deployment to finish. All weapon actions are blocked until then. |
Deploy Animation integer |
Animation played when weapon is deployed. |
Deploy Sound weapon_custom_sound |
Sound played when weapon is deployed. |
Idle Animations List of integers |
Animations to randomly play when weapon is idle. |
Idle Animation Time float |
Delay between idle animations. |
Player Animations integer |
Third-person reference animations. |
Laser Sight Sprite string |
Sprite displayed at crosshair surface. |
Laser Sight Sprite Scale float |
Size of of the laser sprite (1.0 = 100%). |
Laser Sight Sprite Color Color |
Color and opacity of the laser sprite. |
Zoom FOV float |
Field of view when zoomed in (degrees). |
HUD Sprite string |
A convenient place to precache the HUD sprite for your weapon. |
HUD Sprite Info Folder string |
Folder where the HUD Sprite text file is stored (relative to "sprites/"). |
Weapon Slot integer |
Horizontal positioning in the weapon menu. |
Weapon Slot Position integer |
Vertical positioning in a weapon menu. |
Auto Switch Priority integer |
Higher number means you'll likely switch to this weapon when picking it up for the first time or depleting another weapon(?) |
# | Name | Description |
---|---|---|
___________________ | ||
1 | Can Select If Empty | Allow the weapon to be selected even if it has no ammo. |
2 | No Auto Reload | Disable automatic reloading when the clip is empty. |
4 | No Empty Switch | Disable automatic weapon switching when no ammo is left. |
8 | Limit In World | If there are few entity slots left, this weapon will not respawn. |
16 | Exhaustible | Destroy weapon when ammo is depleted. |
32 | Hide Secondary Ammo | Don't show the secondary ammo count on the HUD. Use this only when the secondary ammo type matches the primary ammo type. |
64 | Laser Sight | Laser sight is enabled by default. |
128 | Disable Jumping | Player can't jump while the weapon is deployed. |
256 | Wait for Projectiles | Weapon won't reload or holster until all projectiles are dead. |
512 | Exclusive Hold | Disables weapon switching. Only one weapon with this flag should be held at any given time. |