Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = "Force Storm",
- icon = "FS",
- texture = "star/icon/storm.png",
- description = "Shoot Bolts of Lightning down from the sky",
- action = function( self )
- if self:GetForce() < 70 then return end
- local pi = math.pi
- posv = {
- pi*2/5,
- pi*4/5,
- pi*6/5,
- pi*8/5,
- 2*pi,
- }
- // Yeah I know not nice
- local tr = util.TraceLine( util.GetPlayerTrace( self.Owner ) )
- if tr.HitPos:Distance( self.Owner:GetPos()) > 2048 then return end
- local pos = tr.HitPos + Vector( 0, 0, 600 )
- self.Owner:EmitSound( Sound( "npc/strider/charging.wav" ) )
- timer.Simple(0.5, function()
- self.Owner:EmitSound( Sound( "ambient/atmosphere/thunder1.wav" ) )
- self.Owner:EmitSound( Sound( "npc/strider/fire.wav" ) )
- for x = 1,5 do
- local pos1 = pos + Vector( 65*math.sin( posv[x] ), 65*math.cos( posv[x] ), 0 )
- local pos2 = pos1 - Vector(0,0,600)
- StormLightning(self, pos1, pos2)
- end
- end)
- self:SetForce(self:GetForce() - 70)
- self.Owner:SetCoolDown(self:GetActiveForcePowerType( self:GetForceType() ).name, 45)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement