Tutorial: Working with NPCs in DM

Jimbro727

Newbie
Joined
Dec 29, 2004
Messages
72
Reaction score
0
Hey! I'm new to the forum.. i found it through another thread about NPCs in single player, and I saw a lot of questions on this forum and elsewhere regarding using NPCs in DM.. so here's a small tutorial detailing what I've found in the last couple of days:

WORKING WITH NPCs IN DM v1.0

FIGHTING
Yes, you CAN spawn NPCs in DM, and they CAN fight!! A lot of the players are buggy.. and I've yet to get humanoid players to fight... but basically to get an NPC to fight you have to do a few things:

Step 1: Set up that particular NPCs variables (I guess you'd call them global variables??)... most of these are called sk_NPCname_other stuff.. you can just go into console, type "sk_" and scroll through the list of variables.. for an antlion, here are the things that you can set:
sk_antlion_health - the amount of health that antlions will have when you spawn them
sk_antlion_jump_damage - the amount of health that the antlion will take away when they jump on you
sk_antlion_swipe_damage - the amount of health that the antlion will take away when they swipe attack you

These three variables should be set before spawning any antlions, any antlions that you spawned prior to setting this up will not have the values that you set. I have seen people asking about how to set the health of NPCs.. and they have been answered with "ent_fire [npc name] sethealth [amount of health]" but I haven't gotten that to work.. every NPC has a health variable, just look for it.. but anyway, the way you'd set these would be to go to console and type the variable a space and the value, so to set the health of antlions, you would enter "sk_antlion_health 100" to give them 100 hp when they spawn.

NOTE: NPCs can have more than 100 health.. so if you wanted to make antlions that are really difficult to kill, you could give them 300hp.

For an awesome list of console commands, including all of the sk_ commands, see: http://www.h l 2 w o r l d .com/wiki/index.php/Half_Life_2_Client_Console_Commands

Step 2: Spawn the NPCs.. this is pretty easy.. I believe that every humanoid and animal NPC can be spawned with the npc_create command, except for strider (use the give command for him), so to spawn an antlion you'd point your crosshair wherever you want to spawn the antlion and then enter "npc_create npc_antlion" in console. You can keep doing this until you have the desired amount of antlions, but just note that if you spawn a lot of NPCs in one area, the game can get quite laggy. Also, to make things easier, I usually bind the create command, so if I wanted to make a bunch of antlions, I'd enter bind 8 "npc_create npc_antlion" in console, and then just point and hit the 8 key wherever I want an antlion...

For a list of NPCs, search this forum or google it.. there are many many different lists!

Step 3: Now that you've spawned your NPCs, you need to tell them who to attack. This is done by setting a relationship between the NPCs and whatever you want them to attack.. so if you wanted all of the antlions to attack all of the human players, you would enter [ent_fire npc_antlion setrelationship "player D_HT 99"] in console.. I'll talk a little more about the ent_fire command later. Let's take a look at this command, because there's a lot that you can do with it..

npc_antlion: this is the entity that you are instructing to attack other things, we wanted to instruct ALL antlions to kill the human players, if we wanted just one particular antlion to do this, we'd have to name it by setting our crosshair on it and entering [ent_setname newname] in console, where newname would be some unique name for the antlion, like Bob. Then instead of npc_antlion, we'd use Bob, so the command only applies to that one antlion.

player: this is the entity that you want the NPC to attack, player is the name of all human players.. again, if you wanted to instruct it to attack only one human player, you'd have to set your crosshair on that player and use ent_setname, then replace "player" with whatever you named the player. You can also instruct the NPC to attack other NPCs.. so if you also spawned some zombies, you could replace "player" with "npc_zombie", or again, use ent_setname on a particular zombie, and use that name so the antlions only attack that one zombie.

D_HT
: This tells the NPC(s) that you want to create a hate relationship, which means that the NPC will attack whoever you specify.. you can also create "like" relationships by replacing D_HT with D_LK, but I haven't player around with this too much. If it does something really cool, I'll update this tutorial.

99: This is a level of hate (or a level of like, if you used D_LK), I usually use 99, because I don't really know what it does and haven't experimented with it too much. I'd assume that if you created a relationship that told antlions to attack players and used 99, and created another relationship between antlions and zombies but used 20, the antlions would try to attack players before they attack zombies.. that's just a guess, though.

That's pretty much it.. if you followed those three steps, as soon as you hit enter on the ent_fire command, the NPCs will begin searching/attacking whatever you told them to. :LOL:

ENT_FIRE
I was going to end the tutorial here, but I decided that I have learned so much about ent_fire in the last few days, that it warranted a section in this tiny tutorial.. so here it goes:

Entities are anything that exist and can interact with players in the game.. this includes animals, robots, and anything that you can pick up with the grav gun. Entities have inputs and outputs... which are both used by the game, but in a far more complicated way than we are going to be using them. We don't care about outputs, because I've yet to find a cool use for them, but if you do, please post it!

ent_fire is a command used by developers to use one input on an entity.. it is used in console like this:

ent_fire [name of entity] [command]

I'm sure you've seen people posting how to burn stuff all over the web.. "ignite" is an input that all entities have (but not all entities use), so if you wanted to set every player on fire, you could enter "ent_fire player ignite" in console. This is a lot of fun if nobody has seen it before.. but if you keep doing it, you'll definitely just piss everyone off :devil: I like to bind the following command, which burns whatever is under your crosshair:

bind b "ent_setname burn;ent_fire burn ignite"

That command sets the entity that you have under your cross hair's name to "burn" then uses ent_fire to trigger the "ignite" input on the "burn" entity. Just be careful, because once you name something, it is called that until the map changes, the server is restarted, or the entity is destroyed.. I'm still looking for a command that unnames an entity.. the effect of this is that if you burn a player, that player will be called "burn," so later when you decide to burn an ammo box, the command sets the ammo box's name to "burn", then tells the game to trigger the ignite input on all entities named "burn," which are the ammo box and the player that you had burned earlier. Thus, that poor player will be burned every single time :( However, this does not happen with entities that respawn, for instance, if you burn an exploding barrel, it will eventually explode, but when it respawns, it will not be called "burn" anymore. It seems that the only entities that keeps their names even after being respawned are players.

For a complete list of inputs and outputs, use the ent_info command. It is used as follows:

ent_info [class name]

Where [class name] is the class name of the entity that you are interested in.. so to get a list of inputs and outputs for our beloved antlion, we'd issue the following command in console:

ent_info npc_antlion

...and a nice list of things you can do with the antlion is spit out in the console. Some of the inputs require a parameter, some don't.. I haven't really played around with complicated inputs that require parameters. An example of a really cool thing that you can do with inputs would be to bind the burrow and unburrow inputs for the antlions:

bind uparrow "ent_fire npc_antlion unburrow"
bind downarrow "ent_fire npc_antlion burrow"

Now, whenever you hit the down arrow, all of the npc_antlions that you spawed will burrow into the ground, and will unburrow when you hit the up arrow!

Look around for cool commands.. I was able to get the helicopter to drop bombs (but wasn't able to get it to chase me) and I was almost able to get the npc_dog to play catch by playing around with inputs, if anyone figures out how to do that, please let me know!

TIPS AND IDEAS

Tip #1: When placing a lot of npcs around a map, I find it easier to turn on noclip by entering "noclip" in console. This allows you to "fly" around the map, and get a good idea of how many npcs are in a particular room. Plus, you can move around a lot faster, so you don't waste too much time setting the map up. Just make sure that your crosshair is pointing at the floor when you spawn the NPC, otherwise it won't spawn (to see those errors, developer mode has to be set to 2). To turn noclip mode off, just enter "noclip" in console, again.

Tip #2: If you want to place everyone on the same team very quickly, the player entity has a setteam input. To use it, enter the following command in console:

ent_fire player setteam #

Replace # with one of the following numbers:
0 - Unassigned
1 - Spectator
2 - Combine
3 - Rebels
I don't think that the model changes when you perform this command, so if you wanted to be a combine super soldier but wanted to be on the rebel team, you could have another player use ent_setname to name your player, and then use that name instead of player so the setteam input only applies to you. For example:
While you are under the other player's crosshair, he'd enter: "ent_setname Jim" in console
And then: "ent_fire Jim setteam 3" to place you on the Rebel team.
I can't remember if this changes your model, but it shouldn't.

Tip #3: For entities that fly, such as npc_combinegunship, npc_helicopter, or npc_combinedropship, to place them above the map, where they should be, use noclip to fly to wherever you want them, and then use "give" instead of "npc_create." For example, after using noclip to position myself wherever I want an npc_helicopter, i'd enter the following command in console:
give npc_helicopter

To avoid getting stuck in the NPC and to avoid damage from falling, fly back down to the ground before turning off noclip. The give command places the entity above you, whereas the npc_create command places the entity on the map wherever your crosshair is pointed at.

Tip #4: To make sure that the NPCs are doing what I want them to do, I often set developer mode to 2 and use the ent_show_response_criteria command. This command displays detailed info about the entity that is under your crosshair, most notably: the health of the entity. This is great if you want to make sure that your antlions are spawning with a bazillion health points and that the zombies are losing hp whenever antlionguards charge them :cheese:. Usually, I bind this command, so I don't have to keep switching to console, since this info is both spit out in console and in the upper left corner of the screen.. so the sequence of commands that I'd enter to set this up would be:

developer 2
bind c "ent_show_response_criteria"

Obviously, you can bind it to whatever key you want.. but when you're done, it's usually a good idea to set developer mode back to 0, because NPCs can sometimes spit out a lot of info in console, and that will start to annoy you.

Another great use for ent_show_response_criteria is to find out the names of entities that you didn't spawn, for example, if you spawn a helicopter and make it drop a bomb using ent_fire, you might be interested in spawning those cool bombs without going through the hassle of spawning a helicopter.. so you could simply set your crosshair over the bomb and issue the ent_show_response_criteria command to find out that the bomb is called "grenade_helicopter." Now, you can simply use "npc_create grenade_helicopter" to spawn those nifty bombs!!

Idea #1: For those of you who have never played the BrainBread mod for HL1, it is an awesome mod that is just like Dawn of the Dead.. there are basically a bunch of zombies, and you have to kill them all. All of the players are on a single "human" team, and players can be infected by zombies, and are then placed on the "Zombie" team, and must kill a couple of humans before they can respawn as a human again. There is supposed to be a brainbread mod for HL2 coming out, but until then, we can somewhat mimmick the mod by placing a bunch of npc_zombies around a map (I like lockdown). Then you just have to put everyone on one team, use the setrelationship input that I discussed before to tell the zombies to attack players, and let the fun begin! You can control the difficulty of the game by increasing/decreasing the health of the zombies and the damage that they cause. Unfortunately, we can't get infected by them, for that we'll have to wait for the real mod! Variations of this game are also a lot of fun, try using antlions, they're awesome!

Idea #2: When you kill an npc_zombie, if you don't shoot it in the head, the headcrab remains alive. Unfortunately, it is not considered an npc_headcrab until the npc_zombie is dead, so you can't use set a relationship between the headcrabs and the players until the zombie is killed. I'm sure that there's a way to set up a trigger sort of thing, so when an npc_zombie is killed, the "ent_fire npc_headcrab setrelationship..." command is executed. Until then, you could always wait until the zombies are dead, then set up the relationship, and clean up the remaining headcrabs.

Idea #3: Use ent_setname to name the players on the opposite team in team deathmatch (you don't have to use unique names, you could just call them all combine if the are on the combine team, or rebel if they are on the rebel team), then spawn a few "npc_vortigaunt"s or "npc_turret_floor"s and set up a hate relationship between those NPCs and whatever you called the players. I'd consider binding the ent_setname command, so you can quickly name the other players, because it would be difficult to go into console and enter the command every time, since the players are usually moving. The commands would look something like this:
bind n "ent_setname combine"
..You'd name the players on the opposite team by placing them under your crosshair and hitting "n"
Spawn some npcs (I suggested vortigaunt and turret_floor because they don't move, they just attack whatever's near them, so they're ideal for holding up a certain area) using "npc_create npc_whatever"
ent_fire npc_whatever setrelationship "combine D_HT 99"


Well, I think that's about it for this tutorial. Pay attention to the version number, because I might change this tutorial as I learn new things and receive new input. I really hope that this helps everyone, and if you have any further questions/comments/ideas/anythings please post and I'll respond as soon as possible! I'd also like to thank the other post on this board that discussed the use of NPCs in single player, I wish I still had the link, it taught me a lot about NPCs, and allowed me to learn how to use them in DM as well as single player. Thanks!

--Jimbro
 
Awesome tutorial!!!! I'm going in-game right now to test it out :D
 
Thanks man! Have fun! After I get some more response, maybe I'll set up a server to demonstrate or something :D

BTW - This is for everyone: I forgot to mention in the tutorial that to set the sk_ variables, you have to be running the server! If you aren't running the server, you can still use all of the other commands, but unless those variables are set, your NPCs won't cause any damage! Enjoy!

--Jimbro
 
Hmmm I can't get the antlions to not fight me o_O I spawned a npc_combine_s changed its name to enemy and then setrelations enemy D_HT 99

and since my relationship with antlions was D_LK 99 they should have attacked the combine_s but they didn't touch them and beelined for me
 
hmm interesting.. i'll have to play around with it.. as I said, I haven't messed with D_LK.. but for future reference, you don't really have to create D_LK relationships.. it won't cause problems, although the npc might spit out some errors in console if you have developer set to 2, because they won't know how to assess you.. but even then, it won't effect the game.. I'd just create D_HT relationships, and the NPCs will ignore everything else :D
 
Set up a server, please! I'd love to play with this with others!
 
Holy shit, that's way too damned complicated. I think I'll just wait for Sven Coop 2. :\
 
Sticky!! Awesome!! I've never had a post stickied before!! What an honor! Thanks! =)

--Jimmy
 
Its a lot easier than it seems my server is usually running by 11 pm eastern time with myself jimbro and a couple of my other friends. you dont even really have to type the commands entirely because in most cases console completes it for you its a matter of clicking on the one you want. also jimmy you might want to include how to erase npcs for lag and accidental spawning purposes. :thumbs: awesome sticky lol :cheers:
 
ahhh I completely forgot to include how to erase NPCs!!! I'll have to throw that in the tutorial... but hey mods.. how come I can't edit my post?!?!

Until I figure out how to incorporate this into my original post:

Removing NPCs
To delete an NPC that is still alive, just set it under your crosshair and type "impulse 203" in console. I like to bind this command, so I can quickly delete NPCs when things start to lag or I realize that I ODed on zombies haha.. just note that you CANNOT remove players, and if a player is under your crosshair when you enter "impulse 203" the game will freeze.. actually it will probably crash the server, and maybe even the clients with a nasty error. If you want to remove all of a certain type of npc, you can use:

ent_remove_all [npc_name]

where [npc_name] would be the name that you used to spawn the npc, for instance, npc_zombie.

Unfortunately, I've yet to figure out how to remove NPCs that have been killed... their dead bodies just stay on the map until you change it, except for npc_strider, for some reason his dead body is an entity, and can be removed with one of the above methods, and even picked up with the gravity gun if you increase the amount of mass that it can pick up.

NOTE: I didn't mention this in the tutorial, but the game probably won't start to lag until the NPCs begin to move.. so if you place a bunch of npc_zombies and the game isn't laggy, set the relationship up, and then the game might start to lag. If it does, you can always impulse 203 them into oblivion.

--Jimbro
 
hey! ya I should have included that in my last post... :D

there are a few variables.. just like the sk_ variables that I discussed in my tutorial.. you can set the following for the grav gun:

physcannon_maxforce - I'm not sure what the min/max stuff do..but it must do something
physcannon_minforce - Again, not sure what this does
physcannon_maxmass - This sets the maximum mass that the cannon can pickup (the answer to your question)

physcannon_pullforce - Sets the force that the gun pulls stuff.. this is awesome to set, because the highed you pull it the farther away you can be from objects and the quicker objects come to you. Just be careful, because if you set it too high, objects can come so fast that they kill you or at least hurt you hahaha

So if I wanted to set the maximum mass to 500 instead of the default 250, I'd enter the following command in console:

physcannon_maxmass 500

Enjoy!

--Jimbro
 
Thanks! Just reread the first post, and saw that you haven't been able to get gun-wielders to work. You know to run "npc_create_equipment weapon_blah" first, right? The command I bind for spawning, say, combine soldiers with smg1s would be "npc_Create_equipment weapon_smg1; wait; npc_create npc_combine_s" It works fine for me, after setting the relationship they attack properly. Hope tha thelps.
 
Yeah I do know that.. do they work in DM though? I have heard that they work in single player, but never tried it. In DM they just stand there with their arms out holding the gun.. lol.. I think I did figure out that they do that because there aren't any animations for that gun, because they aren't supposed to be carrying it.. so if you give a humanoid NPC a gun that they were designed to carry, their arms look normal.. but still don't fight. Any ideas? I'd really really like to fight against human AI in DM.. that'd rock :D

Edit: I just tried the smg1/combine_s combo in DM, and he just stood there with his arms out holding the smg... but he turned to follow me, but there was absolutely no motion in his limbs.. just a stiff rotation.. and when I set up the relationship, it spit out some errors and didn't do anything :|

--Jimbro
 
Have anyone tried to make citizens ally to other npc? I tried to make citizens ally with combines but it wouldn't work at all.

I typed in :

ent_fire npc_citizen setrelationship "npc_combine_s D_LK 90"

Correct command right? But I get this error message :


***ERROR***
Bad relationship type (D_LK) to unknown entity (npc_combine_s)!

I am pretty sure this is the right command because when I simply change the D_LK command to D_HT it would work. I've tried the same command with other npc entered but it also doesn't work. It doesn't seem like I can make citizen ally to other NPC , either that or there's a different command that's required?
 
Hey! I'm not too sure about D_LK myself... after writing the tutorial, I played around with it a little.. and I always get that message :/ I'm sorry for writing it, I think I was misinformed. Although, I've seen the D_LK relationship written in many different places. Perhaps it's only a single player thing? Sorry about that :D I do know that a "like" relationship is possible, and also a "fear" relationship.. and "neutral" I believe.. because in Hammer, these are all options that you can use in the ai_relationship entity.

It would be appreciated if someone could shine some light on this topic =D

--Jimbro
 
OMG!

this thread is gold for me!
back to the scripting!

here's a sample:
alias spawn_buggy "rcon sv_cheats 1; impulse 82; wait10; rcon sv_cheats 0; say_buggy"
 
Jimbro727 said:
Hey! I'm not too sure about D_LK myself... after writing the tutorial, I played around with it a little.. and I always get that message :/ I'm sorry for writing it, I think I was misinformed. Although, I've seen the D_LK relationship written in many different places. Perhaps it's only a single player thing? Sorry about that :D I do know that a "like" relationship is possible, and also a "fear" relationship.. and "neutral" I believe.. because in Hammer, these are all options that you can use in the ai_relationship entity.

It would be appreciated if someone could shine some light on this topic =D

--Jimbro

It doesn't work in single player as well. It's the same thing as in MP , just that the default NPC relationship is set rather than nothing at all. It seems like only certain npc such as combines will accept the D_LK command. Maybe npc such as citizen requires a different command to ally other npc?
 
Btw , does anyone know how to set the name for your server?
 
ReaperSWE: Awesome! I'm so glad that it's helping people. When I first saw the potential that the Source engine had, I set out to gather every bit of info that I could about this topic, to use it to its full potential. Then I figured I'd share that info with everyone else who's looking for the same info. Good luck! =)

Wasper: Hmm good info about the D_LK command.. I'll have to investigate that one.. it would make sense that only certain things can be allied with each other. I mean we are using the NPCs in a way that they were not designed for. And, as flexible as the engine is, the programmers didn't write things that had no official purpose. Thus, we do have some limitations, and this just might be one of them. :D And no, I don't know how to change the server name from console.. I think you can set it when you start up the server? Otherwise, you can check the site that I mentioned in the tutorial, it has a comprehensive list of console commands. Just make sure that you take out the spaces in the URL, I had to put them in because for some reason the board wouldn't let me post the URL.. kept putting stars in it :/

--Jimbro
 
by the way...

do you know how to set relationship things on a remote server?
I've got the thing to work on my own private one, but I don't know how to do it on rcon?...

and also, is there any way I can bind or set an alias for:
ent_fire npc_antlion setrelationship "player D_HT 99"
couse, do to the " It can't be used in the aliases :/ any onther way to do it?

here's some nice alias a made, quite useful when using certain commands.
Wait command:
alias wait5 "wait; wait; wait; wait"
alias wait10 "wait5; wait5"
alias wait50 "wait10; wait10; wait10; wait10; wait10"

and, if you want to know, Im trying to spawn these rollermines, and "hoppers"...
 
never mind, I got the rcon working:

bind kp_5 "rcon sv_cheats 1; jump; give npc_rollermine; wait10; rcon sv_cheats 0"
rcon sv_cheats 1; rcon ent_fire npc_antlion setrelationship "player D_HT 99"; wait50; wait50; rcon sv_cheats 0
 
!!! does "rcon sv_cheats 1" set sv_cheats to 1 on the remote server?!?! That would be sick!! As far as the binding goes... try using single quotes around player D_HT 99.. i think the following command would work:

bind c "npc_create npc_antlion;wait;ent_fire npc_antlion setrelationship 'player D_HT 99'"

That *should* spawn an antlion and tell it to attack players when you press 'c', but its untested. Good luck, and keep us updated.. your work is verry interesting!!!

--Jimbro
 
Jimbro727 said:
!!! does "rcon sv_cheats 1" set sv_cheats to 1 on the remote server?!?! That would be sick!! As far as the binding goes... try using single quotes around player D_HT 99.. i think the following command would work:

bind c "npc_create npc_antlion;wait;ent_fire npc_antlion setrelationship 'player D_HT 99'"

That *should* spawn an antlion and tell it to attack players when you press 'c', but its untested. Good luck, and keep us updated.. your work is verry interesting!!!

--Jimbro

I find a better way is to write a cfg file with the setrelationship commands all layed out, ie make a cfg named antlion with
Code:
ent_fire npc_antlion setreleationship "player d_ht 99"
ent_fire npc_antlion setreleationship "npc_zombie d_ht 99" 
ent_fire npc_antlion setreleationship "npc_antlionguard d_ht 99" 
ent_fire npc_antlion setreleationship "npc_blahblahblah d_ht 99"
then bind
bind c "npc_create npc_antlion;wait;exec antlion

but thats just my way of doing this.

ps.: [post=1076252]heres[/post] an old post of mine about this.
 
not bad, not bad...
nice thing about the cfg file.

and, now I got the thing to work completly on a remote server!

rcon sv_cheats 1; ent_fire npc_antlion setrelationship "player D_HT 99; wait50; wait50; rcon sv_cheats 0
it just needed some wait time to activate :)
And no one is able to use cheats on the server unless the scrip failes or thay are damn quick with a binded key :p

and if you don't allready know this...

add this into the autoexec.cfg file to use the wait command better: said:
alias wait5 "wait; wait; wait; wait"
alias wait10 "wait5; wait5"
alias wait50 "wait10; wait10; wait10; wait10; wait10"

and for the binded keys, don't you hate when you acidentally hit the wrong key? I use the Key-pad for my binds :p
kp_home kp_uparrow kp_pgup kp_5 kp_minus ...
 
Grand Architect: Ahh that's not a bad idea with the cfg file :D

ReaperSWE: How does rcon work? I tried it on a few servers, but it said something about the wrong rcon password :/ AWESOME about the keypad.. that's definitely going to be useful!! I was wondering how to do that :) I have a Logitech diNovio keyboard, so the keypad is seperate from the actual keyboard, so now I can bind all cool NPC stuff to all of my keypad keys, and I won't be accidentally spawning crap all over the map ahhahaha Plus, I'll have a nifty NPC spawning pad :D Very cool!

--Jimbro
 
Well, about the rcon...
You can only use rcon if you have the password (rcon_password)

and if there is some key that you want to bind, but doesn't know the "name" for it. You can assign a that key for anything in the options menu, then go into the config.cfg file and find the option, look what stand next to it and there you go..

example:
bind "SPACE" "+jump"

another thing about the keypad...
I once in Quake 3 arena made a few scripts, but the key pad was to small, so I made some kind of a thing where you could toggle the scripts with the num-lock key. try and se if you can get that working by your self...
 
Hey that's a sweet idea... but I don't have a numlock key.. and I just noticed that I don't hahaha.... my pad has three buttons.. one that uses the numbers (like if numlock were on), one that uses the navigation buttons (like numlock off).. but it has more than just arrows.. has an open, close, back, and forward button... and another that uses the pad as a calculator that runs seperate from the computer, using the LCD that's on the pad... but I might be able to work with those three buttons.. maybe set up three different number pad configs, and use those keys to switch between them... but the problem with this keyboard/mouse set is that it uses alot of nonstandard signals I guess.. because I have several buttons on the mouse, but the two by the thumb seem to send a ctrl singnal to HL2.. and a funky character if you're typing in word, notepad, or AIM. Hmmm but I like the idea of setting up some key that changes your layout for different situations... very good stuff.. thanks for the idea :D

--Jimbro
 
Here is a full list of spawnable npcs. Tell me if I have missed any. I want to know if there is one for the actual combine slug thing.

gman
rollermine
poisonzombie
mossman
eli
monk
metropolice
manhack
cscanner
launcher
kleiner
ichthyosaur
headcrab_poison
headcrab_fast
headcrab
helicopter
gman
fastzombie
poisonzombie
mossman
dog
pigeon
seagull
crow
combine_s
combinegunship
combinedropship
alyx
breen
barney
barnacle
antlion
citizen
antlionguard
stalker
strider
vortigaunt
zombie
zombie_torso
headcrab_black
stalker
 
Very nice list! I have some that I found on the web or in-game jotted down at home... I'm in FL right now, but your list seems pretty complete.. off the top of my head, I believe these three also work:

turret_floor
turret_ceiling
grenade_helicopter

Thanks!

--Jimbro
 
Hey! Sure, no problem! I'll fix it up to include everything that I've learned since I wrote it and since it's been posted... I'm away in Florida right now, but as soon as I return home I'll let you know and start rewriting it. Thanks! =)

--Jim
 
That link that I gave you allows you to submit tutorials. You should be able to just copy and paste it in and submit.

If you don't want to mess with that you can also email me.

webmasterATphenylshouse.com

Thanks!
 
In the future, jimbro727 will be adding my findings to this post to aid script kiddies and admins.
 
Striders/Gunships

This topic has been very useful in getting NPCs working in deathmatch. However, I was wondering if there was any way to get Striders and/or Gunships/Helicopters working correctly in deathmatch. I've gotten the Strider to "attack" the player(it aimed and played the sound, but no damage was done and no projectiles were visible), but I haven't managed to get the Gunships/Helicopters to do anything other than fly into a wall. If anyone has knowledge on how to get these operating properly, I would be grateful.
 
Well.... let's start with striders: For now, we can only get the strider's cannon to work.. there is an input called "setcannontarget" which will tell the strider to fire its cannon on something. You would use it in the following way:

ent_setname target
- use ent_setname to set the name of whatever you want it to kill
ent_fire npc_strider setcannontarget target - tell the strider to fire its cannon at whatever you just named "target"

After you enter the last command, the strider will kill whatever you told it to.. but be careful, its cannon acts in the same way as alt-fire on the ar2, so if you tell it to use its cannon on an NPC, your client will crash :(

As far as the gunships and helicopters go, you need to set up air nodes.. we are currently working on this issue (myself and JohnnyJigglez, who has already figured out how to make land nodes).. these nodes tell the flying things how to navigate around the map... after we get that down, we'll also work on getting them to fire at players.. so keep an eye on this thread, because we will be posting major progress here.

Glad to see this tut helped you out, please let me know if you have any other questions :cheers:

--Jim
 
I've noticed several strange behaviors. If you npc_create a manhack in the singleplayer game, it will chase you down and kill you, no questions or quirks. If you do the same in DM, it doesn't even attempt to fly at you. Its as if the flying logic was cut out of the code or something. I've tried to use airnodes and hints with no success.

Those flying things are a pain in the butt to get working...
 
Thanks, I guess I'lll just mess around with the variables then, maybe I can get somthing going. As for the manhacks, I set one up, and it just started flying up, and up, and up some more. Lost sight of it after a while. Stupid buzzsaws.
 
Back
Top