How to Bind Console Commands to a Key

Acert93

Newbie
Joined
Oct 24, 2004
Messages
297
Reaction score
0
Hello,

Someone had mentioned you can bind console commands to keys. How is this done?

Here is the reason why... I have beat HL2 and want to enjoy some of the neat cheats. The one I have been tinkering with is time scale:

sv_cheats 1
host_timescale 1.0

Anything above 1.0 speeds the game up, and anything below 1.0 slows it down ala The Matrix.

After playing with this command I have found I really enjoy it! Makes my Gordon feel even more like The One!

What I want to do is bind then consle command host_timescale 0.5 to one key so I can slow down the game at ANY time and bind host_timescale 1.0 to another key so I can speed it right back up.

Can anyone help me bind these console commands to a key? Thanks!

Ps- This would be a kewl feature in a Coop or even MP mod if kept within reason. Maybe if a person has a special weapon or something... make it very short (10 seconds?) and can only be used by each player ONCE per game... anyhow, sort of like a total adrenaline RUSH effect like in sports where you see the entire field and are in the ZONE. Could be kewl if kept in balance.
 
put -applaunch -dev -tconsole in your HL2 starting command thing and it will automatically enable cheats whenever you boot up the game, no more sv_cheats 1 for me!
 
I could not get the bind key to work with the host_timescale command. Can someone else give this a try?

Btw, thanks for the help guys :) Much appreciated... the slow down effect is VERY cool!
 
try using quotes.

bind / "host_timescale 1.0"

By the way, this cheat is awesome! Its more fun decreasing speed to about 0.5 while having huge armies of combines versus citizens, you get to check out the action easier and not as much processing to be done (lower speed equals more frames).
 
red_LED said:
try using quotes.

bind / "host_timescale 1.0"

Maybe this will help...

Basic Console Commands

Now.. this area will just be console items you can input to make your FPS rise a little.

Items will be listed Command 1/0 . 1/0 means you can toggle it on and off using 1 or 0 respectively.


r_3dsky 1/0 - Turns off the clouds and sky effects. SOME FPS is gained, not a lot though.

r_shadows 1/0 - As far as I know, all it changes is being able to use flashlights. It might disable shadows though.

r_dynamic 1/0 - I believe it disables dynamic water effects... not quite sure. Disable if you don't like the water or there is alot of water and it lags you.

r_lod 1/0 - Not sure...supposedly helps FPS (if someone can test this or I test myself, will update)

This is all I know so far, but they seem to help.

Now for some cheats:
NOTE:You have to enable SV_cheats to use them.

sv_cheats 1/0 (1 to enable cheats, otherwise they don't work)

God - Simple eh? God mode. Invincible.

Buddha - Takes away damage or something..

Noclip - Back from the Quake 1 days... you can fly basically, through walls, floors, doors so forth.

Notarget - Enemies don't know your there, some triggers still happen though, like Antlions popping up or enemies/allies spawning at parts of the map.

Impulse 101 - All weapons, full ammo.

Impulse 102 - Spawns a human skull that just pops out of the sky..

Impulse 82 - Spawns buggy. Fun!

cl_drawhud 1/0 - turns hud display on/off

and now Map

Map - loads a map from the SP campaign.

Maps * - loads a list of maps you can play.



These are just basics... next we start the NPC stuff smile.gif



Advanced Spawning Commands

Finally.. the point of my guide...

This will detail how to spawn all kinds of NPC's such as the ones stated in the beginning.

We start with the command NPC_create. This is the base of all of the spawning. I spent hours figuring out what the base enemies were called so I could spawn them.


NPC_create - creates an NPC...can NOT be used by itself.

NPC_create NPC_(name here) - this is how it is basically used.

NPC_create_aimed - same as the first create command, but the NPC you spawn is aimed away from you.

NPC_create_equipment - this is where you give your NPC's weapons. They can all only use what they use during the game (Pulse rifle, SMG, pistol, RPG, Shotgun). You have to change this to each one when you want spawn enemies with different weapons.

NPC_citizen_auto_player_squad 1/0 - This makes citizens automatically join your squad when you get near them. Cannot be used unless the next command is set to '1'.

NPC_citizen_auto_player_squad_allow_use 1/0 - This HAS to be on to allow the citizens to join you.

NPC_barnacle_Swallow 1/0 - thrown in for laughs..make an NPC go to a barnacle and he will be gibbed biggrin.gif


Now we go to the NPC and weapon lists.


NPC's are always accessible, nomatter what map. So long as you name it correctly, it will spawn.


List of NPC's:

These are used as: npc_create npc_citizen for example, it spawns a citizen at the spot your crosshair is pointed at.

Good guys:

npc_citizen*
npc_antlion* (only good if you have Pheropods, or BugBait)

Bad guys:

npc_combine_s (regular combine soldier)
npc_zombie
npc_headcrab

*NOTE 1: Will attack Antlions. Nomatter what.

*NOTE 2: Will attack anyone but you (ONLY if you have bugbait.) (this includes Citizens.)

NOTE 3: Warning! do not get Bugbait or antlions will sit still like idiots.

I'm trying to get sentry guns, manhacks, and more to spawn but all I got was a strider... which started under the level.

NPC_create_equipment weapons:

weapon_smg1 (normal SMG everyone uses)
weapon_ar2 (pulse rifle)
weapon_pistol (pistol)
weapon_shotgun (shotgun)
weapon_rpg (rocket launcher, they use it against ANYTHING. does not work with Combine)


So, to spawn a citizen that has an RPG, and will follow you:

NPC_citizen_auto_player_squad 1
NPC_citizen_auto_player_squad_allow_use 1
NPC_create_equipment weapon_rpg
NPC_create npc_citizen

Now you have a citizen, with an RPG, that is in your squad. He will follow all orders and shoot to kill.

To bind yourself 4 keys to spawn a Zombie, a Citizen, an Antlion, and a Combine Soldier, use this:

In the console:

Bind M "npc_create npc_zombie"
Bind , "npc_create npc_antlion"
Bind . "npc_create npc_citizen"
Bind / "npc_create npc_combine_s"
 
Using " works.

bind v "host_timescale 0.5"
bind b "host_timescale 1.0"

Ton of fun slowing it down, fighting, and then speeding it back up. Makes Gordon feel even more like Neo!

Btw, for those having troubles spawning stuff, use no clip, go in the air, and then spawn them, move, than end no clip. This made it so striders did not fall into the floor! ANd they do impale people and ant lions! I got DOG and Barney killed :/

Now if I can only get the blue gun to work... I tried going to an end level and then back but it disappeared... will try again :)
 
sublidieminal said:
When you do this, does mouse speed slow down as well?

You are slowed down just a tad, but not that much. I have mine on 7 for mouse sensativity, and with slo-mo on I am able to do as much turning with the mouse I need. It is not annoying at all. Give it a try!
 
That suks anyone know?

How in the heck can I create my army of people and my antlions not kill em. LOL!
 
Back
Top