Garry's Mod Wiki

Revision Difference

ENTITY:GetRelationship#560230

<function name="GetRelationship" parent="ENTITY" type="hook"> <file line="84">gamemodes/base/entities/entities/base_ai/init.lua</file>⤶ <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>. 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>