Difference between revisions of "LUA:GetRunbackDistance"
(Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
|||
| Line 1: | Line 1: | ||
| − | = LUA Functions: | + | = LUA Functions: GetRunbackDistance() = |
| − | + | Gets the distance to the given spawns run back location | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | GetRunbackDistance(param1) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn whos run back distance we want |
| − | |||
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed_busy(NPC, Spawn) |
| − | + | Say(NPC, "I am " .. GetRunbackDistance(NPC) .. " from my run back location") | |
| − | |||
end | end | ||
</pre> | </pre> | ||
| − | This is | + | This will have the spawn respond to a hail while it is in combat with the distance to its run back location. |
== Notes == | == Notes == | ||
| − | + | This returns a float value | |
Latest revision as of 19:10, 28 August 2013
LUA Functions: GetRunbackDistance()
Gets the distance to the given spawns run back location
Syntax
GetRunbackDistance(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn whos run back distance we want
Usage
function hailed_busy(NPC, Spawn)
Say(NPC, "I am " .. GetRunbackDistance(NPC) .. " from my run back location")
end
This will have the spawn respond to a hail while it is in combat with the distance to its run back location.
Notes
This returns a float value