No categories assigned
LUA:SetInCombat
- Last edited 12 years ago by I need to Update My Profile
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.