killing npc_citizens
Post Reply
Quote
Re: killing npc_citizens
Posted by max_morgon on Thu Apr 5th at 1:49pm 2007


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?




Quote
Re: killing npc_citizens
Posted by ferdam on Fri Apr 6th at 12:12am 2007


to make a npc_citizen be a enemy use this code in console:

Code:
ent_fire npc_citizen setrelationship !player D_HT 99


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

Code:
ent_fire npc_citizen setrelationship !player (here try some thing <img src=" SRC="images/smiles/icon_biggrin.gif">)




Quote
Re: killing npc_citizens
Posted by Natus on Fri Apr 6th at 12:31am 2007


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.




Quote
Re: killing npc_citizens
Posted by Stadric on Fri Apr 6th at 1:32am 2007


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



Quote
Re: killing npc_citizens
Posted by Natus on Fri Apr 6th at 1:43am 2007


Oh yea...
Note to self, don't answer questions at 3 am.




Quote
Re: killing npc_citizens
Posted by max_morgon on Sat Apr 7th at 10:20am 2007


I did manage to make them shoot me, the problem is to kill them.



Quote
Re: killing npc_citizens
Posted by Naklajat on Sat Apr 7th at 8:48pm 2007


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



Quote
Re: killing npc_citizens
Posted by Riven on Sun Apr 8th at 5:11am 2007


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...







Quote
Re: killing npc_citizens
Posted by SeanOCR on Mon Apr 9th at 11:39am 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.

Message submitted 28 minutes after original post:

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.




Quote
Re: killing npc_citizens
Posted by Riven on Mon Apr 9th at 12:10pm 2007


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.







Quote
Re: killing npc_citizens
Posted by dec1234 on Mon Apr 16th at 5:23pm 2007


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..





Post Reply