function EFFECT:Init(effectdata) local pos = effectdata:GetOrigin() local normal = effectdata:GetNormal() local particle sound.Play("weapons/physcannon/energy_disintegrate"..math.random(4, 5)..".wav", pos, 80, math.random(70, 90)) sound.Play("weapons/physcannon/energy_sing_explosion2.wav", pos, 80, math.random(105, 120)) local emitter = ParticleEmitter(pos) local emitter2 = ParticleEmitter(pos, true) emitter:SetNearClip(24, 32) emitter2:SetNearClip(24, 32) for i=1, 100 do particle = emitter:Add("effects/splash2", pos) particle:SetDieTime(0.3) particle:SetColor(50, 150, 255) particle:SetStartAlpha(255) particle:SetEndAlpha(0) particle:SetStartSize(6) particle:SetEndSize(6) particle:SetStartLength(60) particle:SetEndLength(60) particle:SetVelocity(VectorRand():GetNormal() * 220) end for i=1, 160 do particle = emitter:Add("effects/blueflare1", pos) particle:SetDieTime(0.3) particle:SetColor(50, 150, 255) particle:SetStartAlpha(255) particle:SetEndAlpha(0) particle:SetStartSize(9) particle:SetEndSize(9) particle:SetVelocity(VectorRand():GetNormal() * 366) end for i=1, 12 do particle = emitter:Add("particles/smokey", pos + Vector(math.Rand(-10, 10), math.Rand(-10, 10), math.Rand(0, 10))) particle:SetVelocity(VectorRand():GetNormal() * 240) particle:SetDieTime(math.Rand(0.3, 0.6)) particle:SetStartAlpha(math.Rand(70, 90)) particle:SetStartSize(1) particle:SetEndSize(math.Rand(150, 160)) particle:SetRoll(math.Rand(-360, 360)) particle:SetRollDelta(math.Rand(-4.5, 4.5)) particle:SetColor(50, 150, 255) end local ringstart = pos + normal * -3 for i=1, 3 do particle = emitter2:Add("effects/select_ring", ringstart) particle:SetDieTime(0.1 + i * 0.1) particle:SetColor(55, 155, 255) particle:SetStartAlpha(255) particle:SetEndAlpha(0) particle:SetStartSize(0) particle:SetEndSize(50) particle:SetAngles(normal:Angle()) particle = emitter2:Add("effects/select_ring", ringstart) particle:SetDieTime(0.2 + i * 0.1) particle:SetColor(55, 155, 255) particle:SetStartAlpha(255) particle:SetEndAlpha(0) particle:SetStartSize(0) particle:SetEndSize(70) particle:SetAngles(normal:Angle()) end emitter:Finish() emitter2:Finish() end function EFFECT:Think() return false end function EFFECT:Render() end