Half-Life 2

Half-Life 2

View Stats:
Half Life 2 Developer Console - setrelationship assistance?
So, I have successfully done a lot with bind keys and setting relationships between objects.

So you know that I know how these relationship settings properly work, this is what I use to make the turrets I create not fire on the citizens.
ent_fire npc_turret_floor setrelationship "npc_citizen D_LI 99"

However, when I create the turret, the citizen always starts pointing its gun at the turret as if it is a threat. I attempted to change that by this line:
ent_fire npc_citizen setrelationship "npc_turret_floor D_LI 99"

However, this second command does not affect the citizen as expected. The citizen still aims his/her firearm at the turret. It is only after I remove the turret (impulse 203) that the citizen proceeds with their monologue and the game continues; but, until the turret is removed, the gameplay 'pauses' (for the lack of a better term).

I've also tried the above with npc_alyx and it does the same thing - she aims her gun onto the turret and just stays there in locked position. If I hold the turret and aim it at her, she becomes fearful and runs away. ... ... but, I purposely set the relationship to D_LI... not D_FR.

I've looked for a while now and cannot find a solution. I'd like to set up turrets where they are fighting for the citizens/Alyx/etc. but, that it doesn't stop regular gameplay as they are afraid (or hate?) the turret. Thoughts?
< >
Showing 1-4 of 4 comments
Shodanxerxes Jun 29, 2019 @ 1:04pm 
Hey there,

I have the exact same problem. have you found a solution yet?
Sidewinder314 Jun 29, 2019 @ 7:27pm 
Unfortunately, I never discovered a solution. If you do find one, please come back and share!
Candie May 28, 2022 @ 12:40pm 
Hello there.
I did some research, and it seems that the relationship situation between turrets and allied npcs is... "Hardwired"
So The only thing I can help you with is spawning a turret that doesn't "pause" the game or create fear among citizens.

ent_create npc_turret_floor spawnflags 512

This will spawn a modified turret from the ones featured in Half Life 2 Episode 2, this is supposed to work in all games since the last HL2E2 patch (According to valve software).
Tell me if this helped you.

EDIT: Like all turrets, when spawned it appears in a state of "stasis" so you may have to use "ent_fire !picker enable" for it to start working.
Last edited by Candie; May 28, 2022 @ 12:46pm
Dalton2250 Jan 24, 2023 @ 11:01pm 
Hey guys, just to let you know - you can also activate your spawned turrets by knocking them over. They make that silly panicked high pitched noise, then they seem to power down, but when you press E to pick them back up and place them they become active. Cheeeeers
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Nov 28, 2018 @ 8:41am
Posts: 4