Impulse: Difference between revisions
Jump to navigation
Jump to search
Confirm:Impulses are not predicted.
m (added Simp.Chinese translation) |
(fixed a bunch of minor things) |
||
Line 3: | Line 3: | ||
|zh-cn=Impulse:zh-cn | |zh-cn=Impulse:zh-cn | ||
}}__NOTOC__ | }}__NOTOC__ | ||
'''<code>impulse</code>''' 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 [[prediction|predicted]].}} | |||
<pre>impulse | Syntax:<pre>impulse NUMBER</pre> | ||
Impulse commands are generally used for development functions and/or cheats, and almost all require [[sv_cheats]]. See <code>[[CBasePlayer]]::ImpulseCommands()</code>, <code>CBasePlayer::CheatImpulseCommands()</code> and <code>CHL2_Player::CheatImpulseCommands()</code>. | Impulse commands are generally used for development functions and/or cheats, and almost all require [[sv_cheats]]. See <code>[[CBasePlayer]]::ImpulseCommands()</code>, <code>CBasePlayer::CheatImpulseCommands()</code> and <code>CHL2_Player::CheatImpulseCommands()</code>. | ||
Line 22: | Line 23: | ||
! Notes | ! Notes | ||
! Description | ! Description | ||
|- | |- | ||
!81 | !81 | ||
| | | | ||
| Gives the player | | Gives the player a {{ent|weapon_cubemap}}, used to test [[cubemaps]]. | ||
|- | |- | ||
!100 | !100 | ||
| Not a cheat | | Not a cheat | ||
| Toggle the player flashlight. Might require | | Toggle the player flashlight. Might require {{ent|item_suit}}, depending on the game. Bound to '''F''' by default. | ||
|- | |- | ||
!101 | !101 | ||
| | | | ||
| Gives player | | Gives player health, all weapons, and ammo. | ||
|- | |- | ||
!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 Half-Life: Source. | | 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 [[Half-Life: Source]]. | ||
|- | |- | ||
!103 | !103 | ||
| | | | ||
| Prints AI state of the NPC the player is looking at to the console. Requires [[developer]] | | Prints [[AI]] state of the [[NPC]] the player is looking at to the console. Requires <code>[[developer]] 1</code>. | ||
|- | |- | ||
!106 | !106 | ||
Line 53: | Line 50: | ||
!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 {{ent|mat_crosshair}} instead, which works on displacements too. | ||
|- | |- | ||
!108 | !108 | ||
| | | | ||
| Sets the NPC under the crosshairs as the Debug NPC. | | Sets the NPC under the crosshairs as the Debug NPC. {{todo|What does that mean?}} | ||
|- | |- | ||
!195, 196, 197 | !195, 196, 197 | ||
Line 69: | Line 66: | ||
!201 | !201 | ||
| Not a cheat | | Not a cheat | ||
| Creates a player spray on the brush under the crosshair. Use Options | | Creates a player [[spray]] on the brush under the crosshair. Use '''Options, Multiplayer''' to set a spray. Default key is '''T'''. | ||
|- | |- | ||
!202 | !202 | ||
Line 77: | Line 74: | ||
!202 | !202 | ||
| Not a cheat | | Not a cheat | ||
| Plays a "player jingle" soundfile. ''To enable jingles'', set | | Plays a "player jingle" soundfile. ''To enable jingles'', set {{ent|cl_soundfile}} to a WAV file under 128KB, enable {{ent|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 | !203 | ||
| | | | ||
| | | Removes the entity under the crosshairs. Same as {{ent|ent_remove}}. | ||
|} | |} | ||
Line 93: | Line 90: | ||
! 50 | ! 50 | ||
| Not a cheat | | Not a cheat | ||
| Makes player command (call/send) a squad. | | Makes player command (call/send) a squad. Bound to '''C''' by default. | ||
|- | |- | ||
! 51 | ! 51 | ||
| | | | ||
| Spawns | | Spawns {{ent|item_dynamic_resupply}}. | ||
|- | |- | ||
! 52 | ! 52 | ||
Line 105: | Line 102: | ||
! 82 | ! 82 | ||
| | | | ||
| Spawns an armed | | Spawns an armed {{ent|prop_vehicle_jeep}}. Same as {{ent|ch_createjeep}}. | ||
|- | |- | ||
! 83 | ! 83 | ||
| | | | ||
| Spawns | | Spawns a {{ent|prop_vehicle_boat}}. Same as {{ent|ch_createairboat}}. | ||
|} | |} | ||
[[Category:Console Commands]] | [[Category:Console Commands]] |
Revision as of 07:05, 14 July 2018
Template:Otherlang2
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.

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 Source games.
# | Notes | Description |
---|---|---|
81 | Gives the player a 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 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 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 | Sets the NPC under the crosshairs as the Debug NPC. Todo: What does that mean?
| |
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. ![]() |
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 | 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_boat. Same as ch_createairboat. |