ent_fire gun1 setrelationship "npc_combine_s D_HT 99"
ent_fire gun1 setrelationship "npc_metropolice D_HT 99
D_HT = hate
Create new cfg file using notepad in folder :/your hl2 dir/hl2/cfg/.name it turret. now open the valve.rc with notepad and you'll see something loke this
// load the base configuration//exec default.cfg
// Setup custom controllerexec joystick.cfg
// run a user script file if presentexec autoexec.cfg//// stuff command line statements//stuffcmds
// display the startup levelstartupmenu
Now replace this
// run a user script file if presentexec autoexec.cfgexec turret.cfg
You have to put your setrelationship command in turret.cfg like mine.
ent_fire gun1 setrelationship "player D_LI 99
bind 7 "npc_create npc_turret_floor"
bind 8 "ent_setname gun1"
bind 9 "exec turret"
bind 0 "ent_fire gun1 enable"
So now you can spawn turret with 7 and setname with 8, 9 make it like you and hate the combines and 0 to enable it.
just a question... how do you get the combine helicopters to attack?
Ex: ent_fire npc_helicopter setrelationship "npc_zombie D_HT 99"
ent_fire npc_helicopter setrelationship "player D_LI 99"