Garry's Mod Wiki

Revision Difference

ENT:OverrideMoveFacing#561529

<function name="OverrideMoveFacing" parent="ENTITY" type="hook">⤶ <added>2023.12.06</added>⤶ <description>⤶ Called to completely override NPC movement facing.⤶ ⤶ <note>This hook only exists for `ai` type SENTs.</note>⤶ </description>⤶ <realm>Server</realm>⤶ <args>⤶ <arg name="interval" type="number">Time interval for the movement, in seconds. Usually time since last movement.</arg>⤶ <arg name="data" type="table">Extra data for the movement. A table containing the following data:⤶ * <page>boolean</page> hasTraced - The result if a forward probing trace has been done⤶ * <page>number</page> expectedDist - The distance expected to move this think⤶ * <page>number</page> flags - AILMG flags⤶ * <page>number</page> maxDist - The distance maximum distance intended to travel in path length⤶ * <page>number</page> navType - <page>Enums/NAV</page>⤶ * <page>number</page> speed - The sequence ground speed. Note these need not always agree with `target`⤶ * <page>Entity</page> moveTarget - Target entity⤶ * <page>Vector</page> dir - The actual move. Note these need not always agree with `target`⤶ * <page>Vector</page> facing - The actual move. Note these need not always agree with `target`⤶ * <page>Vector</page> target - Object of the goal⤶ </arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="boolean">Return `true` to disable the default movement facing code.</ret>⤶ </rets>⤶ </function>⤶