Forum posts

Posted 6 months ago2024-04-21 20:27:37 UTC
in Make NPCs hostile to whatever hurt them Post #348743
I'm making a Half-Life 2 Episode 1 mod, and I want to figure out how to make NPCs change their relationship to hate whatever hurts them, and then reset it after losing an enemy.

I know it's possible to do this in Hammer with the ai_relationship entity, and make the NPC activate it when it's damaged by the player (OnDamagedByPlayer in the I/O system), but how can I do this for every NPC?
For example, if a player attacks a npc_citizen, how can I make that citizen attack the player when it's shot by the player?

Or another example, there's 2 citizens and one metrocop in one room.
How do I make it so that, if the first citizen attacks the other citizen for whatever reason, the cop attacks the first attacker?
I have access to source code.
Posted 7 months ago2024-04-14 03:35:32 UTC
in Game crashes when using impulse 101 Post #348710
I've been using this SDK https://www.moddb.com/downloads/half-life-sdk-v23-for-visual-studio-2008
to make a Half-Life Mod. So far, all i've done is add a new weapon, ammo type, and remove the MP5 grenades.

It all works fine, except that the game crashes without an error whenever I use impulse 101
in the console.
And yes, I do have sv_cheats set to 1.

Help would be appreciated. :hecu: