moved ally engage stuff to ContentArea onUpdate

This commit is contained in:
Tahir Akhlaq 2017-10-11 19:23:40 +01:00
parent 520ae7a119
commit 27200b8df5
15 changed files with 115 additions and 98 deletions

View file

@ -0,0 +1,22 @@
require ("modifiers")
function onSpawn(mob)
mob:SetMod(modifiersGlobal.Speed, 0)
end
function onDamageTaken(mob, attacker, damage)
if not attacker:IsPlayer() and mob:GetHP() - damage < 0 then
mob:addHP(damage)
end
end
function onCombatTick(mob, target, tick, contentGroupCharas)
if mob:GetSpeed() == 0 then
mob:SetMod(modifiersGlobal.Speed, 8)
end
end
function onDisengage(mob)
mob:SetMod(modifiersGlobal.Speed, 0)
mob:Despawn()
end