Garry's Mod Wiki

Revision Difference

ENTITY:GetRelationship#560097

<function name="GetRelationship" parent="ENTITY" type="hook"> <description>Called when scripted NPC needs to check how he "feels" against another entity, such as when <page>NPC:Disposition</page> is called.</description> <realm>Server</realm> <args> <arg name="ent" type="Entity">The entity in question</arg> </args> <rets> <ret name="" type="number">How our scripter NPC "feels" towards the entity in question. See <page>Enums/D</page>.</ret> <ret name="" type="number">How our scripter NPC "feels" towards the entity in question. See <page>Enums/D</page>. Not returning any value will make <page>NPC:Disposition</page> return the default disposition for this SNPC's given `m_iClass` by the engine. </ret> </rets> </function>