Impulse: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(cleaned)
Line 1: Line 1:
A [[console command]] which can do lots of different stuff depending on its numeric parameter.
'''Impulse''' is a generic client-side [[console command]] that is used to send commands to the server without modifying the [[usercmd]].


Here is a list. All impulses marked as a cheat will require [[sv_cheats]] to be enabled.
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 [[prediction|predicted]].}}
==Syntax==
{{Syntax|impulse <number>}}
==Impulse List==
===General===
These commands are used in-game by default.
;impulse 100:Toggles the flashlight on/off for the player.<br/>Default key: <code>F</code>


<pre>impulse <number></pre>


===[[Half-Life 2]]===
Impulse commands are generally used for development functions and/or cheats, and almost all require [[sv_cheats]]. See <code>[[CBasePlayer]]::ImpulseCommands()</code> and <code>CBasePlayer::CheatImpulseCommands()</code>.
;impulse 50:Makes player command (call/send) a squad.<br/>Default key: <code>C</code>
;impulse 51:Spawns [[item_dynamic_resupply]].
;impulse 52:Rangefinder. Prints Starting position, ending position, 3D distance and 2D distance.


== Impulses ==


===Spawn Commands===
=== General ===
;impulse 82:Cheat. Spawns an armed [[prop_vehicle_jeep|buggy]].
;impulse 83:Cheat. Spawns an airboat.
;impulse 101:Commonly used cheat. Gives the player all weapons, extra ammo, extra health and extra energy. (Can also be used In counter strike source to fill up the players cash reserves)
;impulse 102:Cheat. Spawns a human skull. (The ''models\Gibs\AGIBS.mdl'' gib.) It spawns a more dynamic set of gibs in [[Half-Life: Source]].


===Other Commands===
These are available in most or all Source games.
;impulse 81:Cheat. Gives the player [[weapon_cubemap]] which is used to test [[cubemaps]].
;impulse 99:Cheat. Only available in [[Half-Life]]. Displays various logos on the players HUD. Used for promotional/demonstration trailers.
;impulse 103:Cheat. Reports status (AI, health, etc.) of the NPC under the crosshairs.
;impulse 106:Cheat. Displays the classname, targetname and modelname of the entity under the crosshairs.
;impulse 107:Cheat. Prints what texture the crosshairs are pointing at.
;impulse 108:Cheat. Debugs the NPC under the crosshairs.
;impulse 200:Cheat. Toggles between lowering/raising the weapon completely, clearing it from the screen, useful for taking screenshots.
;impulse 203:Cheat. Remove the entity under the crosshairs.


===Multiplayer games===
{| class="standard-table"
;impulse 201:Paints decal in multiplayer.<br />Default key: <code>T</code>
! #
! Notes
! Description
|-
!81
|
| Gives the player [[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 (<code>models\Gibs\AGIBS.mdl</code>) from inside the player (might land behind you). Meant to spawn a "random" gib.
|-
!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
|
| Players the current [[viewmodel]]'s holster animation. Doesn't actually prevent shooting. 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
| Not a cheat
| Plays a "player jingle" soundfile. Overrides the 202 cheat impulse, which would spray blood over the [[brush]] under the crosshair. ''To enable jingles'', set <code>cl_soundfile</code> to a WAV file under 128KB, enable <code>cl_customsounds</code> 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 <code>[[ent_remove]] !picker</code>.
|}


===[[Half-Life 2]]===


===Nonfunctional===
{| class="standard-table"
;impulse 195:Cheat. Would show the shortest path in the level to the nearest node_viewer_fly node.
! #
;impulse 196:Cheat. Would show the shortest path in the level to the nearest node_viewer_large node.
! Notes
;impulse 197:Cheat. Would show the shortest path in the level to the nearest node_viewer_human node.
! Description
;impulse 202:Would play 'player jingle'.
|-
;impulse 202:Cheat. Would splatter blood decal.
! 50
| Not a cheat
| Makes player command (call/send) a squad. Default key: <code>C</code>
|-
! 51
|
| Spawns [[item_dynamic_resupply]].
|-
! 52
|
| Rangefinder. Prints Starting position, ending position, 3D distance and 2D distance.
|-
! 82
|
| Spawns an armed [[prop_vehicle_jeep|buggy]].
|-
! 83
|
| Spawns an airboat.
|}


[[Category:Console Commands]]
[[Category:Console Commands]]

Revision as of 10:24, 16 December 2010

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() and CBasePlayer::CheatImpulseCommands().

Impulses

General

These are available in most or all Source games.

# Notes Description
81 Gives the player 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.
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 Players the current viewmodel's holster animation. Doesn't actually prevent shooting. 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 Not a cheat Plays a "player jingle" soundfile. Overrides the 202 cheat impulse, which would spray blood over the brush under the crosshair. 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.pngNote:This works with the SDK codebase, but games typically appear to disable jingles.
203 Remove the entity under the crosshairs. Same as ent_remove !picker.

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.