You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:MoveToLocation"
(Created page with "= LUA Functions: MoveToLocation() = Has the spawn move to the given location ==== Syntax ==== MoveToLocation(param1, param2, param3, param4) ==== Parameters ==== ; Required -...") |
|||
| Line 4: | Line 4: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | MoveToLocation(param1, param2, param3, param4) | + | MoveToLocation(param1, param2, param3, param4, [param5], [param6]) |
| Line 13: | Line 13: | ||
: ''param3'' is the y coordinate to move to | : ''param3'' is the y coordinate to move to | ||
: ''param4'' is the z coordinate to move to | : ''param4'' is the z coordinate to move to | ||
| + | ;Optional - ''param5'' (float), ''param6'' (string) | ||
| + | : ''param5'' is the speed | ||
| + | : ''param6'' is a lua call back function | ||
Revision as of 18:12, 28 January 2016
LUA Functions: MoveToLocation()
Has the spawn move to the given location
Syntax
MoveToLocation(param1, param2, param3, param4, [param5], [param6])
Parameters
- Required - param1 (Spawn), param2 (float), param3 (float), param4 (float)
- param1 is the spawn to move
- param2 is the x coordinate to move to
- param3 is the y coordinate to move to
- param4 is the z coordinate to move to
- Optional - param5 (float), param6 (string)
- param5 is the speed
- param6 is a lua call back function
Usage
function hailed(NPC, Spawn)
MoveToLocation(NPC, 10, 0, 20)
end
When hailed the NPC will move to 10, 0, 20