Impulse: Difference between revisions
m (→General:  tf2)  | 
				Mycatismycat (talk | contribs)  m (Use template instead of link)  | 
				||
| (16 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
{{  | {{LanguageBar}}  | ||
{{TabsBar}}  | |||
{{split|based on engine}}  | |||
{{This is a|console command|name=impulse|engine=Source|engine1=Source 2}}  | |||
__NOTOC__  | __NOTOC__  | ||
It is a generic client-side [[console command]] that is used to send commands to the server without modifying the [[usercmd]].  | It 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.  | 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.  | ||
| Line 9: | Line 12: | ||
Syntax:<pre>impulse NUMBER</pre>  | Syntax:<pre>impulse NUMBER</pre>  | ||
Impulse commands are generally used for development functions and/or cheats, and almost all require {{  | Impulse commands are generally used for development functions and/or cheats, and almost all require {{cmd|sv_cheats}}. See <code>[[CBasePlayer]]::ImpulseCommands()</code>, <code>CBasePlayer::CheatImpulseCommands()</code> and <code>CHL2_Player::CheatImpulseCommands()</code>.  | ||
==Impulses==  | ==Impulses==  | ||
===General===  | ===General===  | ||
These are available in most or all Source games.  | These are available in most or all GoldSrc, Source and Source 2 games.  | ||
{| class="standard-table"  | {| class="standard-table"  | ||
! #  | ! #  | ||
| Line 40: | Line 43: | ||
In {{portal2|4}} only fully charged portal gun. In {{p2ce|4}} gives fully charged portal gun and fully charged [[weapon_paintgun|paint gun]].  | In {{portal2|4}} only fully charged portal gun. In {{p2ce|4}} gives fully charged portal gun and fully charged [[weapon_paintgun|paint gun]].  | ||
In {{bms|4}} it does the same thing as in {{hl2|4}}, doesn't   | In {{bms|4}} it does the same thing as in {{hl2|4}}, doesn't give [[item_longjump|long jump module]].  | ||
In {{tf2|4}} it refills health and ammo for all weapons.  | In {{tf2|4}} it refills health and ammo for all weapons.  | ||
| Line 46: | Line 49: | ||
!102  | !102  | ||
|  | |  | ||
| Spawns a [[VPhysics]] human skull (<code>models\Gibs\AGIBS.mdl</code>) from inside the player (might land behind you). Meant to spawn a "random" gib and seems to be used in   | | Spawns a [[VPhysics]] human skull (<code>models\Gibs\AGIBS.mdl</code>) from inside the player (might land behind you). Meant to spawn a "random" gib and seems to be used in {{hls|4}}.  | ||
|-  | |-  | ||
!103  | !103  | ||
|  | |  | ||
| Prints [[AI]] state of the [[NPC]] the player is looking at to the console. Requires {{  | | Prints [[AI]] state of the [[NPC]] the player is looking at to the console. Requires {{cmd|developer|1}}.  | ||
|-  | |-  | ||
!106  | !106  | ||
| Line 58: | Line 61: | ||
!107  | !107  | ||
|  | |  | ||
| Prints the material that player is looking at to console. Only works on brushes: use {{  | | Prints the material that player is looking at to console. Only works on brushes: use {{cmd|mat_crosshair}} instead, which works on displacements too.  | ||
|-  | |-  | ||
!108  | !108  | ||
| Line 65: | Line 68: | ||
|-  | |-  | ||
!195, 196, 197  | !195, 196, 197  | ||
| Nonfunctional  | | Nonfunctional, creates nonexistent entity that used to exist in {{goldsrc|4}}  | ||
|   | | {{goldsrc|2}} leftover supposed to show the shortest path to the nearest air, large, and human nodes respectively.  | ||
|-  | |-  | ||
!200  | !200  | ||
| Line 74: | Line 77: | ||
!201  | !201  | ||
| Not a cheat  | | Not a cheat  | ||
| Creates a player [[spray]] on the brush under the crosshair. Use '''Options, Multiplayer''' to set a spray. Default key is '''T'''.  | | Creates a player [[spraycan|spray]] on the brush under the crosshair. Use '''Options, Multiplayer''' to set a spray. Default key is '''T'''.  | ||
|-  | |-  | ||
!202  | !202  | ||
| Line 82: | Line 85: | ||
!202  | !202  | ||
| Not a cheat  | | Not a cheat  | ||
| Plays a "player jingle" soundfile. To enable hearing/playing jingles, set {{  | | Plays a "player jingle" soundfile. To enable hearing/playing jingles, set {{cmd|cl_customsounds|1}}. Set the sound file for a jingle using {{cmd|cl_soundfile|<file path relative to game folder>}}. Sound files must be Source-compatible [[WAV]] files under 128KB (512KB in newer engines). Jingles function using the same system as sprays, and are subject to the same anti-spam cooldown. {{note|This works with the SDK codebase, but games seem to typically disable jingles.}}  | ||
|-  | |-  | ||
!203  | !203  | ||
|  | |  | ||
| Removes the entity under the crosshairs. Same as {{  | | Removes the entity under the crosshairs. Same as {{cmd|ent_remove}}.  | ||
|}  | |}  | ||
| Line 100: | Line 103: | ||
|-  | |-  | ||
! 51  | ! 51  | ||
|  | | Not a cheat (in DM)  | ||
| Spawns {{ent|item_dynamic_resupply}}.  | | Spawns {{ent|item_dynamic_resupply}}.  | ||
|-  | |-  | ||
| Line 109: | Line 112: | ||
! 82  | ! 82  | ||
|  | |  | ||
| Spawns an armed {{ent|prop_vehicle_jeep}}. Same as {{  | | Spawns an armed {{ent|prop_vehicle_jeep}}. Same as {{cmd|ch_createjeep}}.  | ||
|-  | |-  | ||
! 83  | ! 83  | ||
|  | |  | ||
| Spawns a {{ent|prop_vehicle_airboat}}. Same as {{  | | Spawns a {{ent|prop_vehicle_airboat}}. Same as {{cmd|ch_createairboat}}.  | ||
|}  | |}  | ||
Latest revision as of 02:41, 7 July 2025
impulse  is a   console command  available in all 
 Source and 
 Source 2 games.
It 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.
Syntax:
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 GoldSrc, Source and Source 2 games.
| # | Notes | Description | 
|---|---|---|
| 76 | Works only in  | 
Caches human grunt when first used, then creates npc_human_grunt which is partially submerged under floor. Mentioned in  | 
| 81 | Gives the player a weapon_cubemap, used to test cubemaps. | |
| 100 | Not a cheat (except in  | 
Toggle the player flashlight. Might require item_suit or cheats (only in  | 
| 101 | In  In  In  In  In   | |
| 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  | |
| 103 | Prints AI state of the NPC the player is looking at to the console. Requires developer 1.
 | |
| 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 | Starts debugging on NPC under the crosshair. | |
| 195, 196, 197 | Nonfunctional, creates nonexistent entity that used to exist in  | 
|
| 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 hearing/playing jingles, set cl_customsounds 1. Set the sound file for a jingle using cl_soundfile <file path relative to game folder>. Sound files must be Source-compatible WAV files under 128KB (512KB in newer engines). Jingles function using the same system as sprays, and are subject to the same anti-spam cooldown.  | 
| 203 | Removes 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. Bound to C by default. | 
| 51 | Not a cheat (in DM) | Spawns item_dynamic_resupply. | 
| 52 | Rangefinder. Prints Starting position, ending position, 3D distance and 2D distance. | |
| 82 | Spawns an armed prop_vehicle_jeep. Same as ch_createjeep.
 | |
| 83 | Spawns a prop_vehicle_airboat. Same as ch_createairboat.
 | 
Counter-Strike: Global Offensive
| # | Notes | Description | 
|---|---|---|
| 100 | Not a cheat | Start weapon inspection. | 
| 202 | Doesn't work. |