You are viewing an old version of this page. Return to the latest version.
Version of 16:14, 28 August 2013 by I need to Update My Profile
Difference between revisions of "LUA:SetInCombat"
(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: SetInCombat() = |
| − | + | Sets the given spawns combat state | |
==== Syntax ==== | ==== Syntax ==== | ||
| − | + | SetInCombat(param1, param2) | |
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1'' (Spawn), ''param2'' ( | + | ; Required - ''param1'' (Spawn), ''param2'' (bool) |
| − | : ''param1'' is the spawn | + | : ''param1'' is the spawn who's combat state we want to change |
| − | : ''param2'' | + | : ''param2'' true if you want to put the spawn in combat, false if you want to take the spawn out of combat |
| − | |||
==== Usage ==== | ==== Usage ==== | ||
<pre> | <pre> | ||
| − | function | + | function hailed(NPC, Spawn) |
| − | + | SetInCombat(NPC, true) | |
| − | |||
end | end | ||
</pre> | </pre> | ||
| − | This is | + | This will cause the spawn to enter combat mode when it is hailed |
== Notes == | == Notes == | ||
| − | + | When putting the spawn into combat it will kill any scripted movement it has and won't resume it until combat is toggled off. | |
Latest revision as of 17:25, 28 August 2013
LUA Functions: SetInCombat()
Sets the given spawns combat state
Syntax
SetInCombat(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (bool)
- param1 is the spawn who's combat state we want to change
- param2 true if you want to put the spawn in combat, false if you want to take the spawn out of combat
Usage
function hailed(NPC, Spawn)
SetInCombat(NPC, true)
end
This will cause the spawn to enter combat mode when it is hailed
Notes
When putting the spawn into combat it will kill any scripted movement it has and won't resume it until combat is toggled off.