Search the Community
Showing results for tags 'crashed'.
Found 1 result
-
-- Panic mode local panicmode = false local function panicfn (inst) if panicmode == false and inst.components.health.currenthealth == .5 then --Transformation local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell smoke") SpawnPrefab("statue_transition").Transform:SetPosition(inst:GetPosition():Get()) inst.AnimState:SetBuild("aki") --Stat changes inst.components.combat.damagemultiplier = 2.5 inst.components.locomotor.walkspeed = 5 inst.components.locomotor.runspeed = 7 inst.components.talker:Say("WAIT STOP!") if inst.components.healthtrigger ~= nil then end panicmode = true end if panicmode == true and inst.components.health.currenthealth == 1 then local x, y, z = inst.Transform:GetWorldPosition() local fx = SpawnPrefab("maxwell smoke") SpawnPrefab("statue_transition").Transform:SetPosition(inst:GetPosition():Get()) inst.AnimState:SetBuild("aki_panic") inst.components.combat.damagemultiplier = 1 inst.components.locomotor.walkspeed = 3 inst.components.locomotor.runspeed = 5 if inst.components.healthtrigger ~= nil then end panicmode = false end if inst.components.healthtrigger ~= nil then end end inst.components.healthtrigger:AddTrigger(panicfn) When I apply this to my character It keeps on crashing, I really need help