killing npc_citizens

killing npc_citizens

Re: killing npc_citizens Posted by max_morgon on Thu Apr 5th 2007 at 1:49pm
max_morgon
5 posts
Posted 2007-04-05 1:49pm
5 posts 1 snarkmarks Registered: Apr 16th 2006
I'm making a singleplayer map with a friend of mine, we lack the modelling skills
and will to make our own models and such and the combines just don't fit the
character of the "bad guys", therefor we want npc_citizens to be the enemies.
I have managed to make them fight me, but I cannot find how to make it so you
will be able to kill them, any ideas?
Re: killing npc_citizens Posted by ferdam on Fri Apr 6th 2007 at 12:12am
ferdam
1 post
Posted 2007-04-06 12:12am
ferdam
member
1 post 0 snarkmarks Registered: Apr 6th 2007
to make a npc_citizen be a enemy use this code in console:

<div class="code">Code:<pre>ent_fire npc_citizen setrelationship !player D_HT 99
[/pre]

I think that this can work.. if dont work continue trying some thing like this:

<div class="code">Code:<pre>ent_fire npc_citizen setrelationship !player (here try some thing :biggrin: )
[/pre]
Re: killing npc_citizens Posted by Natus on Fri Apr 6th 2007 at 12:31am
Natus
570 posts
Posted 2007-04-06 12:31am
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
Create an ai_relationship entity.

Set the subject to the name of your npc_citizens, they should all have the same name.

Target should be set to !player

Disposition: Hate.

There you go, citizens that go berserk on you on sight.
Re: killing npc_citizens Posted by Stadric on Fri Apr 6th 2007 at 1:32am
Stadric
848 posts
Posted 2007-04-06 1:32am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
You guys aren't answering the whole post. He wants to be able to kill the citizens, not just have them shoot at him.

I don't know how to do that myself, though.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: killing npc_citizens Posted by Natus on Fri Apr 6th 2007 at 1:43am
Natus
570 posts
Posted 2007-04-06 1:43am
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
Oh yea...
Note to self, don't answer questions at 3 am.
Re: killing npc_citizens Posted by max_morgon on Sat Apr 7th 2007 at 10:20am
max_morgon
5 posts
Posted 2007-04-07 10:20am
5 posts 1 snarkmarks Registered: Apr 16th 2006
I did manage to make them shoot me, the problem is to kill them.
Re: killing npc_citizens Posted by Naklajat on Sat Apr 7th 2007 at 8:48pm
Naklajat
1137 posts
Posted 2007-04-07 8:48pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
IIRC, you might need to change something in the C++ code for that, unfortunately. It's a lot of trouble for something that simple. There have been some HL2 MODs that have added it, I can't recall any names though.

You could probably find the answer here: http://developer.valvesoftware.com/wiki/SDK_Docs

Try 'Programming' and possibly 'Tutorials'

o

Re: killing npc_citizens Posted by Riven on Sun Apr 8th 2007 at 5:11am
Riven
1640 posts
Posted 2007-04-08 5:11am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
I played the mod: "Combine Destiny," (which I highly recommend) and they managed to pull off the "rebels attacking you AND you able to kill them" scenario. You could contact them and ask for the code.

Check 'em out at: http://www.combinedestiny.com/index2.php. I'm sure they'll be more than willing to help...
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: killing npc_citizens Posted by SeanOCR on Mon Apr 9th 2007 at 11:39am
SeanOCR
12 posts
Posted 2007-04-09 11:39am
SeanOCR
member
12 posts 31 snarkmarks Registered: Apr 7th 2007
<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>OK, the easy way to do this is create an npc_combine_s. One of the Keyvalues you can change is Model. Just set this to the citizen model and there you go. You have all the same options as though you had created a soldier (which weapon, num of grenade, etc..) Only draw back is that they still use the sounds of the combine.

<div class="abouttext">Message submitted 28 minutes after original post:</b></div>
<div style="text-align: left;">Sorry, I made a tad error. I forgot I edited my fgd file so hammer would allow me this

option. There are two ways that you can still use the npc_combine_s entity with a

citizen model. The first is a bit of a cheat, but it works. What you can do is create

and monster_generic entity, select the model you want to use. Then, change the entity to

npc_combine_s and the Model value will retain the value from monster_generic....make

sense? That is kinda of the "half ass" not completly correct way to do it. The second

way to do it is to edit your halflife2.fgd as such:

BEFORE CHANGE:
@NPCClass base(BaseCombine) studio("models/Combine_Soldier.mdl") = npc_combine_s :

"Combine Soldier"
[
model(choices) : "Model" : "models/combine_soldier.mdl" : "Regular Soldier" =
[
"models/combine_soldier.mdl" : "Regular Soldier"
"models/combine_soldier_prisonguard.mdl" : "Nova Prospekt Soldier"
"models/combine_super_soldier.mdl" : "Elite Soldier"
]

tacticalvariant(choices) : "Tactical Variant" : "0" =
[
"0" : "Normal Tactics"
"1" : "Pressure the enemy (Keep advancing)"
]
]

AFTER CHANGE:
@NPCClass base(BaseCombine) studio() = npc_combine_s : "Combine Soldier"
[
model(studio) : "Model"
tacticalvariant(choices) : "Tactical Variant" : "0" =
[
"0" : "Normal Tactics"
"1" : "Pressure the enemy (Keep advancing)"
]
]

Now you can use any model with the npc_combine_s entity.
</div>
Re: killing npc_citizens Posted by Riven on Mon Apr 9th 2007 at 12:10pm
Riven
1640 posts
Posted 2007-04-09 12:10pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Hmmph, that?s a pretty nifty way to do it. Did you ask the "Combine Destiny" guys? Cause their NPC citizens make all the appropriate grunting noises of a citizen when getting shot at and dying.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: killing npc_citizens Posted by dec1234 on Mon Apr 16th 2007 at 5:23pm
dec1234
2 posts
Posted 2007-04-16 5:23pm
dec1234
member
2 posts 0 snarkmarks Registered: Apr 13th 2007 Location: England
You could make a script that loads automatically that uses this:

sk_citizen_health "40"

That should set the health for them and allow you to kill them i think?
Meh I'm new but its worth a try..