Difference between revisions of "LUA:SetTarget"
(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: SetTarget() = |
| − | + | Sets the target of the spawn given by ''param1'' to the spawn given by ''param2'' | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | SetTarget(param1, param2) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn), ''param2'' (Spawn | + | ; Required - ''param1'' (Spawn), ''param2'' (Spawn) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn who's target we want to set |
| − | : ''param2'' is the spawn | + | : ''param2'' is the spawn we want the first spawns target set to |
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed(NPC, Spawn) |
| − | + | SetTarget(NPC, Spawn) | |
| − | |||
end | end | ||
</pre> | </pre> | ||
| − | This | + | This will set the NPC's target to the player who hailes it. |
| − | |||
| − | |||
| − | |||
Latest revision as of 17:02, 28 August 2013
LUA Functions: SetTarget()
Sets the target of the spawn given by param1 to the spawn given by param2
Syntax
SetTarget(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (Spawn)
- param1 is the spawn who's target we want to set
- param2 is the spawn we want the first spawns target set to
Usage
function hailed(NPC, Spawn)
SetTarget(NPC, Spawn)
end
This will set the NPC's target to the player who hailes it.