-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinit.lua
More file actions
39 lines (28 loc) · 962 Bytes
/
init.lua
File metadata and controls
39 lines (28 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function EFFECT:Init( data )
local pos = data:GetOrigin()
local grav = Vector(0, 0, math.random(50, 60))
local offset = Vector(0,0,10)
local emitter = ParticleEmitter( pos )
if emitter then
local particle = emitter:Add( "sprites/music", pos + offset )
particle:SetVelocity( ( Vector( 0, 0, 1 ) + ( VectorRand() * 0.1 ) ) * math.random( 15, 30 ) )
particle:SetDieTime( math.random( 0.5, 0.8 ) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 3 )
particle:SetEndSize( 1.5 )
particle:SetRoll( math.random(0.5, 10) )
particle:SetRollDelta( math.Rand(-0.2, 0.2) )
particle:SetColor( 255, 255, 255 )
particle:SetCollide( false )
particle:SetGravity( grav )
grav = grav + Vector(0, 0, math.random(-10, -5))
offset = offset + Vector( math.random(1, 5), math.random(.5, 5), math.random(1.5, 6))
emitter:Finish()
end
end
function EFFECT:Think( )
return false
end
function EFFECT:Render( )
end