Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- ENT.last = 0
- function ENT:Draw()
- end
- function ENT:Think()
- if CurTime() > self.last then
- local ep = self.Entity:GetPos()
- local em = ParticleEmitter(ep, false)
- local part
- for i=0,4 do
- local pp = VectorRand() * 4
- if em then
- part = em:Add("sprites/light_glow02_add",ep + pp)
- if part then
- part:SetLifeTime(0)
- part:SetDieTime(0.5)
- part:SetVelocity(pp * 5)
- part:SetAirResistance(300)
- part:SetStartSize(1 + math.random() * 16)
- part:SetEndSize(0)
- part:SetStartAlpha(180 + math.random() * 60)
- part:SetEndAlpha(160)
- part:SetColor(255,255,255,255)
- end
- end
- end
- for i=0,8 do
- local pp = VectorRand() * ( math.abs(math.sin(CurTime())) * -16 ) //always negative?
- if em then
- part = em:Add("sprites/light_glow02_add", ep + pp)
- if part then
- part:SetLifeTime(0)
- part:SetDieTime(0.5)
- part:SetVelocity(pp * ( math.abs(math.sin(CurTime())) * -5 )) //yup!
- part:SetAirResistance(300)
- part:SetStartSize(1 + math.random() * math.random(1, 16))
- part:SetEndSize(0)
- part:SetStartAlpha(180 + math.random() * 60)
- part:SetEndAlpha(160)
- part:SetColor(255,255,255,255)
- end
- end
- end
- self.last = CurTime() + 0.1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement