Go Back   Halflife2.net Forums > Multiplayer Games > Half-Life 2: Deathmatch

Reply
 
Thread Tools
  #1  
Old 18-10-2009, 06:58 AM
nicatronTg nicatronTg is offline
Scanner
 
Join Date: Oct 2009
Steam ID: nicatronTg
Posts: 2
Zombies in DM?

After trying 3 different fourms, I'm finally here asking the question that I can never get a good answer to. Is it possible to get zombies in half life 2 deathmatch without crashing the server? I know some servers have zombies, but most of course don't.

All help appreciated.
Reply With Quote
  #2  
Old 18-10-2009, 07:41 AM
tschumann's Avatar
tschumann tschumann is offline
Fast Headcrab
 
Join Date: May 2008
Location: Australia
Posts: 681
I don't think this is possible without making a mod. I believe there's some code on Valve Developer wiki to properly enable npcs in Half-Life 2 Deathmatch.
Reply With Quote
  #3  
Old 18-10-2009, 08:09 AM
nicatronTg nicatronTg is offline
Scanner
 
Join Date: Oct 2009
Steam ID: nicatronTg
Posts: 2
Quote:
Originally Posted by tschumann View Post
I don't think this is possible without making a mod. I believe there's some code on Valve Developer wiki to properly enable npcs in Half-Life 2 Deathmatch.
By any chance do you know what section it would be under? I hate digging through the valve developer wiki.
Reply With Quote
  #4  
Old 23-10-2009, 11:39 PM
tschumann's Avatar
tschumann tschumann is offline
Fast Headcrab
 
Join Date: May 2008
Location: Australia
Posts: 681
I think this is it.
Reply With Quote
  #5  
Old 30-10-2009, 08:52 AM
Calhoun's Avatar
Calhoun Calhoun is online now
Fast Zombie
 
Join Date: Oct 2003
Location: Wisconsin
Steam ID: Calhoun
Posts: 2,427
I don't believe that spawning an NPC will crash a Half-Life 2 Deathmatch server. They are definitely bugged but we used to spawn (read: spam hundreds of) NPCs and get them to "work" without major issues, on our server.

Basically, you have to set it all up yourself but after a while, it isn't too difficult and you can even create your own scripts to spawn them and set them up easily.

First, you must enable server cheats with: sv_cheats "1". After this, you can start to go to work. You'll need to set the health and damage values for the NPCs you intend to spawn. I'll use the zombie as an example. (I am using Episode 2 as a reference, so these variables may be differently named than what they are in Half-Life 2/Deathmatch, but you should be able to find them in the console easily enough. The "find" command does work wonders.)

sk_zombie_health xx
sk-zombie_dmg_both_slash xx
sk_zombie_dmg_one_slash xx
sk_headcrab_health xx
sk_headcrab_melee_dmg xx

Where xx is the value you desire, which you can play around with for something you like, or just look up their original singleplayer values to use here. You could likely use the actual skill.cfg file to automatically set everything by copying it over from Half-Life 2's /cfg/ folder to Half-Life 2 Deathmatch's and typing "exec skill.cfg" once you're in the game, although this may conflict with Half-Life 2 Deathmatch specific settings, so it's best to make your own script or do it manually ingame.

Then we can spawn. You can use the npc_create command to spawn an NPC where you are looking; if it's an enemy that can carry a weapon you can use npc_create_equipment weapon_xxx (xxx being smg1, ar2, shotgun, pistol, etc), and you can additionally use npc_create_aimed so that they spawn with angles that match the direction you're facing.

Here are the simple steps to follow:

1) npc_create npc_zombie

2) ent_fire npc_zombie setrelationship "player d_ht 99" -- this may be able to be done to apply it to every npc_zombie on the map at once, it's been so long and I can't really recall.

3) If step two doesn't work: aim at the zombie and type ent_fire !picker setrelationship "player d_ht 99"

4) If step three fails (I don't believe !picker works in Deathmatch): aim at the zombie and give it a name by typing ent_setname xxx (xxx being what you desire). Then you can type, ent_fire xxx (name) setrelationship "player d_ht 99"

5) If you want them to attack other NPCs you'll do essentially the same thing as step 2-4 as they work, except with player replaced with a specific NPC's name that you've given it, or a specific npc_ entity name such as npc_combine_s. If you wish to make them stop attacking another NPC or the player simply put d_li in place of d_ht.

Now they should attack you, but they probably won't make noises and will appear to be skipping or somewhat laggy, and will be bugged, but they do work.
__________________
At least I know what smarties are.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:32 AM.


Powered by: vBulletin Copyright Jelsoft © 2000 - 2005