Garry's Mod Wiki

Revision Difference

ENTITY:TranslateNavGoal#563066

<title>ENTITY:TranslateNavGoal</title>⤶ ⤶ <function name="TranslateNavGoal" parent="ENTITY" type="hook">⤶ <added>2024.12.12</added>⤶ <description>⤶ Called by the engine to alter NPC's final position to reach its enemy or target. ⤶ ⤶ <note>This hook only exists for `ai` type SENTs.</note>⤶ </description>⤶ <realm>Server</realm>⤶ <args name="Chasing Enemy">⤶ <arg name="enemy" type="Entity" default="GetEnemy()">The enemy being chased.</arg>⤶ <arg name="currentGoal" type="Vector" default="GetEnemyLastKnownPos()">The enemy's chase position.</arg>⤶ </args>⤶ <args name="Moving to target">⤶ <arg name="target" type="Entity">The path_corner in query.</arg>⤶ <arg name="currentGoal" type="Vector">path_corner's origin.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="Vector">The actual point that NPC will move to reach its enemy or target.⤶ ⤶ Do not return anything to not override.</ret>⤶ </rets>⤶ </function>⤶