diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 14:42:09 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 14:42:09 -0400 |
| commit | 2736f498f30220b858fc6fac23e7ddc4a597df6d (patch) | |
| tree | 374ceadedb654b00e09dac321620a8320830f734 /entities/effects/rad_explosion | |
| download | redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.tar.gz redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.tar.bz2 redead-2736f498f30220b858fc6fac23e7ddc4a597df6d.zip | |
Inital commit
Diffstat (limited to 'entities/effects/rad_explosion')
| -rw-r--r-- | entities/effects/rad_explosion/init.lua | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/entities/effects/rad_explosion/init.lua b/entities/effects/rad_explosion/init.lua new file mode 100644 index 0000000..e888a2e --- /dev/null +++ b/entities/effects/rad_explosion/init.lua @@ -0,0 +1,55 @@ + +function EFFECT:Init( data ) + + local pos = data:GetOrigin() + Vector(0,0,40) + local emitter = ParticleEmitter( pos ) + + for i=1, math.random(4,8) do + + local particle = emitter:Add( "effects/blood", pos ) + particle:SetVelocity( VectorRand() * 100 + Vector(0,math.random(-25,25),50) ) + particle:SetDieTime( 1.0 ) + particle:SetStartAlpha( 255 ) + particle:SetEndAlpha( 0 ) + particle:SetStartSize( math.random( 5, 10 ) ) + particle:SetEndSize( math.random( 20, 40 ) ) + particle:SetRoll( math.Rand( -360, 360 ) ) + particle:SetColor( 100, 200, 0 ) + particle:SetGravity( Vector( 0, 0, -300 ) ) + + end + + for i=1, 20 do + + local vec = VectorRand() + vec.z = math.Rand( -0.2, 1.0 ) + + local particle = emitter:Add( "effects/yellowflare", pos ) + particle:SetVelocity( vec * 300 ) + particle:SetDieTime( math.Rand( 2.5, 3.5 ) ) + particle:SetStartAlpha( 200 ) + particle:SetEndAlpha( 0 ) + particle:SetStartSize( math.random( 2, 4 ) ) + particle:SetEndSize( 0 ) + particle:SetRoll( math.random( -360, 360 ) ) + particle:SetColor( 100, 200, 0 ) + particle:SetGravity( Vector( 0, 0, -300 ) ) + + particle:SetCollide( true ) + particle:SetBounce( math.Rand( 0.1, 0.5 ) ) + + end + + emitter:Finish() + +end + +function EFFECT:Think( ) + + return false + +end + +function EFFECT:Render() + +end |
