A (better?) npc spawning script.

Joined
Sep 3, 2004
Messages
1,827
Reaction score
2
After five grueling minutes of work, I've cooked up and brand-spanking new npc spawner script! Yes, I know there are others out there, but this one is packed with "extra" features that should make it interesting...
Here's the entire script for those of you who can't figure out how to download it: :farmer:

//NPC SPAWNER v1.3.3.7
//by Teta_Bonita
//Never use console commands again! :)

//INSTALLATION:
//Just place this file into your /cfg folder (namely "C:/program files/steam
//steamapps/[email protected]/half-life 2/hl2/cfg") and type "exec npcspawner"
//in the console whilst in a game. Note that you'll have to type in "exec npcspawner"
//everytime you would like to use this script. If you want it to start automatically,
//put the same command in your "autoexec.cfg" file (if you don't have one already, make //one!).

//FEATURES:
//This script has shortcuts to MOST (not all) of the npc's in Half-Life2. I tried to //include as many as I can, but if there are a few you would like to add please feel free
//to do so. In addition to npc's, this script has shorcuts to npc usable weapons (bound to //f1-f4 and 7-0, see "weapons" section for details), cheats, and other useful commands.
//Some of these commands include: removing entities (uparrow by default), freezing the AI in //their tracks (downarrow), setting npc's on fire (rightarrow), setting npc's for //destruction by a strider, and putting combine soldiers into squads (put your crosshairs
//on any combine soldiers you want to add to a squad and hit leftarrow by default, this //will GREATLY improve their AI. You can also spawn combine soldiers already in a squad //with the "i" key). To kill an npc with a strider, first you have to spawn one (the"6" key //on your keypad). If the strider spawned correctly, aim your crosshairs at it's head and //press the "o" key. Then put your crosshairs on your target, and press the "p" key. If you //did everything right, the strider should blow the target up with it's gaint penis-cannon.
//Anyway, here's a short list of what this script can do:
//-spawn most npc's
//-set npc weapons
//-remove entities (uparrow)
//-freeze AI (downarrow)
//-burn almost anything (rightarrow)
//-blow suff up with a strider ("o" to name strider, "p" to kill target)
//-put combine soldiers into squads (leftarrow)
//-take a screenshot with out any HUD/weapons (f8)
//-Slowmo and REALLYslowmo (keys v & b respectavely)
//-uber gravity gun ("j" key to enable, "k" key to disable)

//KNOWN ISSUES:
//Gunships, dropships, and helicopters have faulty AI- they tend to stay in one place.
//Striders can't move.
//Sometimes you have to noclip into the air to spawn a strider correctly.
//You'll have to memorize the keys... :/
//Combine leets and medic citizens are on holiday. :(

sv_cheats 1
npc_citizen_auto_player_squad 1

//good guys
bind "kp_end" "npc_create npc_citizen"
bind "kp_downarrow" "npc_create npc_barney"
bind "kp_pgdn" "npc_create npc_alyx"
bind "kp_enter" "npc_create npc_vortigaunt"
bind "/" "npc_create npc_gman"
bind "\" "npc_create npc_kleiner"

//combine
bind "kp_leftarrow" "npc_create npc_metropolice"
bind "kp_5" "npc_create npc_combine_s"
bind "kp_rightarrow" "give npc_strider"
bind "i" "npc_create npc_combine_s; wait; ent_setname combine; wait; ent_fire combine setsquad 1

//zombies
bind "kp_home" "npc_create npc_zombie"
bind "kp_uparrow" "npc_create npc_fastzombie"
bind "kp_pgup" "npc_create npc_poisonzombie"

//antlions
bind "kp_ins" "npc_create npc_antlion"
bind "kp_del" "npc_create npc_antlionguard"


//headcrabs
bind "kp_slash" "npc_create npc_headcrab"
bind "*" "npc_create npc_headcrab_fast"
bind "kp_minus" "npc_create npc_headcrab_poison"

//machines
bind "home" "npc_create npc_cscanner"
bind "end" "npc_create npc_manhack"
bind "ins" "npc_create npc_turret_floor"
bind "pgup" "npc_create npc_rollermine"


//flyers
bind "del" "npc_create npc_helicopter"
bind "pgdn" "npc_create npc_combinedropship"
bind "kp_plus" "npc_create npc_combinegunship"

//weapons
bind "f1" "npc_create_equipment weapon_smg1"
bind "f2" "npc_create_equipment weapon_shotgun"
bind "f3" "npc_create_equipment weapon_ar2"
bind "f4" "npc_create_equipment weapon_pistol"
bind "7" "npc_create_equipment weapon_crowbar"
bind "8" "npc_create_equipment weapon_alyxgun"
bind "9" "npc_create_equipment weapon_annabelle"
bind "0" "npc_create_equipment weapon_rpg"

//other commands
bind "'" "ch_createjeep"
bind "semicolon" "ch_createairboat"
bind "m" "impulse 101"
bind "," "notarget"
bind "." "god"
bind "uparrow" "ent_remove"
bind "downarrow" "ai_disable"
bind "leftarrow" "ent_setname combine; wait; ent_fire combine setsquad 1"
bind "rightarrow" "ent_setname firewood; wait; ent_fire firewood ignite"
bind "l" "noclip"
bind "o" "ent_setname strider"
bind "p" "ent_setname byebye; wait; ent_fire strider setcannontarget byebye"
bind "f8" "cl_drawhud 0; impulse 200; wait; wait; wait; jpeg; wait; wait; wait; cl_drawhud 1; impulse 200"
bind v "+slow"
alias "+slow" "host_timescale 0.3;phys_pushscale 20;cl_phys_timescale 0.1;sv_gravity 300;"
alias "-slow" "host_timescale 1;phys_pushscale 1;cl_phys_timescale 1;sv_gravity 600;"
bind b "+reallyslow"
alias "+reallyslow" "host_timescale 0.1;phys_pushscale 30;cl_phys_timescale 0.033;sv_gravity 230;"
alias "-reallyslow" "host_timescale 1;phys_pushscale 1;cl_phys_timescale 1;sv_gravity 600;"
bind "j" "Physcannon_maxforce 10000; physcannon_minforce 3000; physcannon_tracelength 1000; physcannon_maxmass 8000; physcannon_pullforce 8000"
bind "k" "Physcannon_maxforce 1500; physcannon_minforce 700; physcannon_tracelength 250; physcannon_maxmass 250; physcannon_pullforce 4000"
Enjoy! :E
 
Hi,
Does anyone know how to change position of an object? If it is possible, I figured we can have a mirror at the trainstation to see how Gordon looks like. I found this works to change zoom level
"ent_fire camera_tv_breen changefov 80"
but no command to change coordinates. Anyway, Alyx cannot die.

best wishes
 
I liked it a lot. It made it easier to spawn NPC's. Good work. :thumbs:
 
Gonna try it, but I'll have to redo much of the key bindings, as I use the arrows for movement, numpad for weapons, ins/home/del/end/pgup/pgdn for the rest of the stuff
 
diluted said:
Gonna try it, but I'll have to redo much of the key bindings, as I use the arrows for movement, numpad for weapons, ins/home/del/end/pgup/pgdn for the rest of the stuff
Er, yah I knew that might be a problem for some people. I just designed this assuming that most people use the default key config. This guy made a config using different keys- you might want to check that out. And yes, this is another bump.... :eek: (last one, I swear!)
 
Nice stuff, but I'm never going to try it out, tho, there's too many keys that needed to be reconfigured! :(
 
Person said:
Hi,
Does anyone know how to change position of an object? If it is possible, I figured we can have a mirror at the trainstation to see how Gordon looks like. I found this works to change zoom level
"ent_fire camera_tv_breen changefov 80"
but no command to change coordinates. Anyway, Alyx cannot die.

best wishes

There is no Gordon model, you are compeletly invisable
 
ríomhaire said:
There is no Gordon model, you are compeletly invisable

There is a player model, it is the same as the HL gordon model, only it has no skin, It's just a grey blur.

Also I saw this when I was in the skybox, and I looked up to the actual skyline and saw a grey blob moving about.
 
I thought all there was to gordon's model was just his hands and part of his arms, the bits you can see when you throw nades and such.
 
Person said:
Hi,
Does anyone know how to change position of an object? If it is possible, I figured we can have a mirror at the trainstation to see how Gordon looks like. I found this works to change zoom level
"ent_fire camera_tv_breen changefov 80"
but no command to change coordinates. Anyway, Alyx cannot die.

best wishes

There is a way to change the position of an object, or actually, they are called "entities". Bind the following commands to the keys of your choice (the entire thing including the quotes. ex: bind x "ent_setname picked;ent_fire picked setparent me"):

"ent_setname picked;ent_fire picked setparent me" - picks up the object when you look at it and press the corresponding key

"ent_setname dropped;ent_fire dropped clearparent" - drops the object you just picked up, and you have to be looking at it
Sometimes the object you pick up will move to the side where you cant look at it directly. If that happens use this command. I suggest binding it too:

"ent_fire picked clearparent" - after using this, you must look at the previously picked up object/objects and use the second command, by pressing the key you bound it to, or else when ever you pick up another object, it will pick up those objects too.

BUT, before any of this will work, you must enter the following command. You will have to enter it only once per level:
"setang 0 -90 0;ent_setname me"
After you enter it you will be looking down, and the pick up commands will now work.

You can pick up absolutely anything with these commands, npc's, physics objects, weapons, health/suit chargers, etc. This also works in multiplayer, and you can pick up other people, given sv_cheats is set to 1.

The one thing is if you pick up a physics object and then set it down, it will stay in place, but as soon as something moves it, it will "teleport" back to where you first picked it up.

I suggest entering the "picker" command when you try moving stuff, it helps a lot. Whatever the picker highlights, you can pick up and put down. Hope you like this, i got the idea from someone else, but i forgot who, so I dont want to take all the credit. Ask me if you have any questions.
 
Back
Top