Set NPC Relatationship

Hi all!
How I can change the relation of NPCs to the player?
For example, if player has a certain model then NPC was not attacked him

bump

[lua]NPCEnt:AddRelationship(“player D_HT 999”)[/lua]
Will make it attack players.

Relations:

Wiki is probably outdated. No idea.

Yeah that should work. Also, the “999” is the priority of the relationship. As an example, say a combine is scared of a zombie next to the player, but wants to fight the player, with these values: combine:AddRelationship(“zombie D_FR 10”); combine:AddRelationship(“player D_HT 20”). It would choose to attack the player since he hates him more than he fears the antlion.

Atleast, that’s how I’ve understood it.

99 is fear. 999 is hate(attack on sight). and 10 is friend, I think!

No, I used to think so too, but the type of relation is determined by the enumerations D_(HT/FR/LI/NU). This command may be more appropriate, and its page has a (slightly) better explanation for the arguments passed to it: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4efc.html?title=NPC.AddEntityRelationship
As you can see, it says priority is how “strongly” the NPC feels. If you look at the valve developer community, you will also see that disposition and priority are different things.

However, it’s not explained in detail what effect different priorities will have, which is the reason for my doubt of whether my explanation was right or not. I just assume it determines which feeling (and entity) an NPC chooses to act upon when faced with several.