Impulse (GoldSrc): Difference between revisions
Jump to navigation
Jump to search

Le Glaconus (talk | contribs) (formatting + clarification) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
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. | ||
Impulse commands are generally used for development functions and/or cheats, and almost all require {{cmd|sv_cheats}}. See | '''Syntax''': | ||
<source> | |||
impulse <number> | |||
</source> | |||
Impulse commands are generally used for development functions and/or cheats, and almost all require {{cmd|sv_cheats}}. See {{code|preset=1|[[CBasePlayer]]::ImpulseCommands()}}, {{code|preset=1|[[CBasePlayer]]::CheatImpulseCommands()}} | |||
== Impulses == | == Impulses == | ||
Line 19: | Line 23: | ||
!76 | !76 | ||
| | | | ||
| | | Firsts sets {{ent|monster_human_grunt|engine=goldsrc}} to be [[precache|precached]] upon next map load, and after cached, spawns a {{ent|monster_human_grunt|engine=goldsrc}} under the crosshair. | ||
|- | |- | ||
!100 | !100 | ||
| Not a cheat | | Not a cheat | ||
| Toggle the player flashlight. Requires {{ent|item_suit}}. Bound to | | Toggle the player flashlight. Requires {{ent|item_suit}}. Bound to {{key|F}} by default. | ||
|- | |- | ||
!101 | !101 | ||
Line 32: | Line 36: | ||
!102 | !102 | ||
| | | | ||
| Spawns 1 random human {{ent|gib}} (model | | Spawns 1 random human {{ent|gib}} (model {{path|models/hgibs|mdl|icon=file}} with randomly set [[bodygroup]]) at player's location. [https://github.com/ValveSoftware/halflife/blob/b1b5cf5892918535619b2937bb927e46cb097ba1/dlls/combat.cpp#L183-L253] | ||
|- | |- | ||
!103 | !103 | ||
Line 44: | Line 48: | ||
!105 | !105 | ||
| | | | ||
| Toggles between player being silent/audible. | | Toggles between player being silent/audible. NPCs won't hear silent player. | ||
|- | |- | ||
!106 | !106 | ||
Line 55: | Line 59: | ||
|- | |- | ||
!195, 196, 197 | !195, 196, 197 | ||
| | | | ||
| | | Shows the shortest path to the nearest air, large, and human nodes respectively. | ||
|- | |- | ||
!199 | !199 | ||
Line 64: | Line 68: | ||
!201 | !201 | ||
| Not a cheat | | Not a cheat | ||
| Creates a player [[CSprayCan (GoldSrc)|spray]] on the brush under the crosshair. Use '''Options, Multiplayer''' to set a spray. Default key is | | Creates a player [[CSprayCan (GoldSrc)|spray]] on the brush under the crosshair. Use '''Options, Multiplayer''' to set a spray. Default key is {{key|T}}. | ||
|- | |- | ||
!202 | !202 | ||
Line 72: | Line 76: | ||
!203 | !203 | ||
| | | | ||
| Removes the entity under the | | Removes the entity under the crosshair. {{note|Only works on entities that can take damage.}} | ||
|} | |} | ||
Line 83: | Line 87: | ||
! 99 | ! 99 | ||
| Not a cheat | | Not a cheat | ||
| If this command was submitted to the console at least three times, this will show the Valve, Sierra Studios and | | If this command was submitted to the console at least three times, this will show the Valve, Sierra Studios and {{hl|2}} logo rotating on the upper right-hand corner of the screen. Works on WON, Steam versions.<br>This command does not work with 1280x720/1280x960 or higher resolutions after 25th Anniversary Update, because the game would fail to find the {{path|icon=image|sprites/1280_logo|spr}} file.<br>This command was used during E3 1998, as seen on the small television screens showcasing gameplay videos of {{hl|2}}. | ||
|} | |} | ||
== See also == | == See also == | ||
* [https://github.com/ValveSoftware/halflife/blob/b1b5cf5892918535619b2937bb927e46cb097ba1/dlls/player.cpp#L3577-L3830 definition in dlls/player.cpp] | * [https://github.com/ValveSoftware/halflife/blob/b1b5cf5892918535619b2937bb927e46cb097ba1/dlls/player.cpp#L3577-L3830 definition in dlls/player.cpp] |
Latest revision as of 07:19, 22 June 2025


impulse
is a console command available in all GoldSrc 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()
Impulses
General
# | Notes | Description |
---|---|---|
76 | Firsts sets monster_human_grunt to be precached upon next map load, and after cached, spawns a monster_human_grunt under the crosshair. | |
100 | Not a cheat | Toggle the player flashlight. Requires item_suit. Bound to F by default. |
101 | ![]() | |
102 | Spawns 1 random human gib (model ![]() models/hgibs.mdl with randomly set bodygroup) at player's location. [1]
| |
103 | Prints AI state of the CBaseMonster entity the player is looking at to the console. Requires developer 1. | |
104 | Dumps global states to console (in ![]() | |
105 | Toggles between player being silent/audible. NPCs won't hear silent player. | |
106 | Prints the classname, targetname, model and also globalname if non-empty of the entity under the crosshairs to the console. | |
107 | Prints the material that player is looking at to console. | |
195, 196, 197 | Shows the shortest path to the nearest air, large, and human nodes respectively. | |
199 | show nearest node and all connections | |
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 | Spray blood over the brush under the crosshair. | |
203 | Removes the entity under the crosshair. ![]() |
Half-Life
# | Notes | Description |
---|---|---|
99 | Not a cheat | If this command was submitted to the console at least three times, this will show the Valve, Sierra Studios and ![]() This command does not work with 1280x720/1280x960 or higher resolutions after 25th Anniversary Update, because the game would fail to find the ![]() sprites/1280_logo.spr file.This command was used during E3 1998, as seen on the small television screens showcasing gameplay videos of ![]() |