Impulse

From Valve Developer Community
Jump to: navigation, search

Impulse is a generic client-side console command that is used to send commands to the server without modifying the usercmd.

The advantage is that new commands can be added without compatibility-breaking networking changes; the disadvantage is that only one impulse can be sent at a time, and that the commands themselves are non-descriptive.
Confirm:Impulses are not predicted.
impulse <number>

Impulse commands are generally used for development functions and/or cheats, and almost all require sv_cheats. See CBasePlayer::ImpulseCommands(), CBasePlayer::CheatImpulseCommands() and CHL2_Player::CheatImpulseCommands().

Impulses

General

These are available in most or all Source games.

# Notes Description
50 Not a cheat Sends/recalls a squad of rebels.
81 Gives the player the weapon_cubemap, used to test cubemaps.
100 Not a cheat Toggle the player flashlight. Might require item_suit, depending on the game. Bound to F by default.
101 Gives player full health, all weapons, and ammo.
102 Spawns a VPhysics human skull (models\Gibs\AGIBS.mdl) from inside the player (might land behind you). Meant to spawn a "random" gib and seems to be used in Half-Life: Source.
103 Prints AI state of the NPC the player is looking at to the console. Requires developer mode.
106 Prints the class, targetname and model of the entity under the crosshairs to the console.
107 Prints the material that player is looking at to console. Only works on brushes: use mat_crosshair instead, which works on displacements too.
108 Sets the NPC under the crosshairs as the Debug NPC. Doesn't appear to have any effect?
195, 196, 197 Nonfunctional Supposed to show the shortest path to the nearest air, large, and human nodes respectively.
200 Plays the current viewmodel's holster animation. Doesn't actually prevent attacking. (The current weapon just won't be visible.) Not all weapons have holstering sequences.
201 Not a cheat Creates a player spray on the brush under the crosshair. Use Options > Multiplayer to set a spray. Default key is T.
202 Obsolete Spray blood over the brush under the crosshair.
202 Not a cheat Plays a "player jingle" soundfile. To enable jingles, set cl_soundfile to a WAV file under 128KB, enable cl_customsounds and join a server. Jingles go through the same system as sprays, and are subject to the same anti-spam cooldown.
Note:This works with the SDK codebase, but games typically appear to disable jingles.
203 Remove the entity under the crosshairs. Same as ent_remove.

Half-Life 2

# Notes Description
50 Not a cheat Makes player command (call/send) a squad. Default key: C
51 Spawns item_dynamic_resupply.
52 Rangefinder. Prints Starting position, ending position, 3D distance and 2D distance.
82 Spawns an armed buggy.
83 Spawns an airboat.