Difference between revisions of "LUA:GetOrigX"
(Created page with "{{PageHeaderChild|LUA|GetOrigX}} = LUA Functions: GetOrigX() = Gets the original spawn location x value for the spawn ==== Syntax ==== GetOrigX(param1) ==== Parameters =...") |
|||
| Line 20: | Line 20: | ||
function MoveBackToSpawn(NPC) | function MoveBackToSpawn(NPC) | ||
local x = GetOrigX(NPC) | local x = GetOrigX(NPC) | ||
| − | local y = | + | local y = GetOrigY(NPC) |
| − | local z = | + | local z = GetOrigZ(NPC) |
MoveToLocation(NPC, x, y, z) | MoveToLocation(NPC, x, y, z) | ||
end | end | ||
Latest revision as of 17:27, 30 August 2019
LUA - GetOrigX
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: GetOrigX()
Gets the original spawn location x value for the spawn
Syntax
GetOrigX(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn we want to get the original location for
Usage
function MoveBackToSpawn(NPC)
local x = GetOrigX(NPC)
local y = GetOrigY(NPC)
local z = GetOrigZ(NPC)
MoveToLocation(NPC, x, y, z)
end
When this function is called it would make the spawn move back to its spawn point