Here is my modifier:
modifier_test = class({})
function modifier_test:OnCreated(table)
self:GetParent():AddNewModifier(
self:GetParent(),
self:GetAbility(),
"modifier_lich_frostnova_slow",
{ duration = 10 }
)
end
function modifier_test:DeclareFunctions(self)
return { MODIFIER_PROPERTY_MODEL_SCALE, MODIFIER_PROPERTY_MODEL_CHANGE }
end
function modifier_test:GetModifierModelChange(self)
print("model change")
return "models/heroes/clinkz/clinkz_back_default.vmdl"
end
function modifier_test:GetModifierModelScale(self)
print("model scale change")
return 1
end
When I create a unit with this modifier before destroying the fort,the game end then scoreboard is displayed.the modifier('modifier_lich_frostnova_slow') expires and the game crashes. i have already tried remove MODIFIER_PROPERTY_MODEL_CHANGE that the crash fixed. what's the problem.