Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EFFECT:Init(data)
- if data:GetEntity():IsValid() then
- local ent = data:GetEntity()
- local StartPos = ent:GetPos()
- self.Emitter = ParticleEmitter(StartPos)
- for i = 1, 100 do
- local p = self.Emitter:Add("effects/splash"..math.random(1,2), StartPos)
- p:SetDieTime(4)
- p:SetStartAlpha(255)
- p:SetEndAlpha(0)
- p:SetStartSize(math.Rand(120, 240))
- p:SetEndSize(math.Rand(240,480))
- p:SetColor(255, 250, 250)
- p:SetVelocity(Vector(math.Rand(-250,250),math.Rand(-250,250),math.Rand(200,2500)))
- p:SetGravity(Vector(0, 0, -350))
- p:SetCollide(true)
- p:SetCollideCallback(function(part,hitpos,normal)
- local effdata = EffectData()
- effdata:SetOrigin(hitpos)
- util.Effect("watersplash",effdata)
- end)
- end
- for i = 1, 100 do
- local p = self.Emitter:Add("effects/bubble", StartPos)
- p:SetDieTime(2)
- p:SetStartAlpha(255)
- p:SetEndAlpha(0)
- p:SetStartSize(math.Rand(5, 10))
- p:SetEndSize(10)
- p:SetColor(255, 250, 250)
- p:SetVelocity(VectorRand() * 1200)
- p:SetCollide(true)
- end
- for i = 1, 1 do
- local p = self.Emitter:Add("effects/splashwake3",StartPos)
- p:SetDieTime(1)
- p:SetStartAlpha(255)
- p:SetEndAlpha(0)
- p:SetStartSize(400)
- p:SetEndSize(2000)
- p:SetColor(255, 250, 250)
- p:SetAngles(AngleRand())
- p:SetCollide(true)
- end
- for i = 1, 1 do
- local p = self.Emitter:Add("effects/splashwake1",StartPos)
- p:SetDieTime(1)
- p:SetStartAlpha(255)
- p:SetEndAlpha(0)
- p:SetStartSize(200)
- p:SetEndSize(1200)
- p:SetColor(255, 250, 250)
- p:SetCollide(true)
- end
- self.Emitter:Finish()
- end
- end
- function EFFECT:Render()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement