1
0
EQ2Emu/docs/lua_functions/GetOrigZ.md
2025-05-13 22:57:49 -04:00

14 lines
425 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Function: GetOrigZ(Spawn)
Description: Returns the original Z coordinate of where the spawn was initially placed.
Parameters:
Spawn: Spawn The entity to check.
Returns: Float The Z position of the spawns original location.
Example:
-- Example usage (calculate how far NPC roamed from spawn point horizontally)
local distanceFromSpawn = math.sqrt((GetX(NPC)-GetOrigX(NPC))^2 + (GetZ(NPC)-GetOrigZ(NPC))^2)