Garry's Mod Wiki

NPC:GetLastPosition

  Vector NPC:GetLastPosition()

Recently Added

This was recently added in version (2024.12.11). It might only be available on the Dev Branch right now.

Description

Returns the last registered or memorized position of the NPC. When using scheduling, the NPC will focus on navigating to the last position via nodes.

See NPC:SetLastPosition.

Returns

1 Vector position
Where the NPC's last position was set to.