-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create Groundpound powerup * Add sounds and effects * Tweak config * Add usage note * Add screenshake * Tweak config * Groundpound punch/juice Add custom effect Play different sounds Rework damage calc Buff knockback on props * Some magic numbers as variables + Increase terminal dmgmul, 25 > 75 + fix terminal radius * More fixes, + comment * Add cooldown to fastfall start sound * Fix comment * Use a less generic name * Use a less generic name; use poroper effect file structure * Fix killicon * Create the effect ourselves * Localize * Style * Use local * Split into separate functions * Localization not really needed here anymore * Fix nil * Fix inverted logic * Cut particle amount in half --------- Co-authored-by: StrawWagen <[email protected]>
- Loading branch information
1 parent
5b57baa
commit 7f773e4
Showing
13 changed files
with
558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function EFFECT:Init( data ) | ||
local pos = data:GetOrigin() | ||
local scale = data:GetScale() | ||
|
||
self.Emitter = ParticleEmitter( pos ) | ||
|
||
local maxsize = 350 * scale | ||
local ptclCount = 300 * scale | ||
|
||
for _ = 1, ptclCount do | ||
local particle = self.Emitter:Add( "particle/smokesprites_000" .. math.random( 1, 9 ), pos ) | ||
if particle then | ||
particle:SetVelocity( Vector( math.random( -10, 10 ), math.random( -10, 10 ), 0 ):GetNormal() * 10000 * scale ) | ||
particle:SetDieTime( 3.5 * scale ) | ||
particle:SetStartAlpha( math.Rand( 40, 60 ) ) | ||
particle:SetEndAlpha( 0 ) | ||
particle:SetStartSize( math.Rand( maxsize * 0.4, maxsize * 0.5 ) ) | ||
particle:SetEndSize( math.Rand( maxsize * 0.8, maxsize ) ) | ||
particle:SetRoll( math.Rand( 0, 360 ) ) | ||
particle:SetRollDelta( math.Rand( -1, 1 ) ) | ||
particle:SetColor( 90, 83, 68 ) | ||
particle:SetAirResistance( 50 ) | ||
particle:SetCollide( true ) | ||
particle:SetBounce( 0 ) | ||
end | ||
end | ||
end | ||
|
||
function EFFECT:Think() | ||
self.Emitter:Finish() | ||
return false | ||
end | ||
|
||
function EFFECT:Render() | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
-- Slimmed down version of m9k_gdcw_cinematicboom from M9K | ||
|
||
function EFFECT:Init( data ) | ||
self.Pos = data:GetOrigin() -- Origin determines the global position of the effect | ||
self.Scale = data:GetScale() -- Scale determines how large the effect is | ||
self.DirVec = data:GetNormal() -- Normal determines the direction of impact for the effect | ||
self.Emitter = ParticleEmitter( self.Pos ) -- Emitter must be there so you don't get an error | ||
|
||
sound.Play( "ambient/explosions/explode_" .. math.random( 1, 4 ) .. ".wav", self.Pos, 100, 100 ) | ||
|
||
self:Dust() | ||
|
||
self.Emitter:Finish() | ||
end | ||
|
||
function EFFECT:Dust() | ||
local emitter = self.Emitter | ||
local dir = self.DirVec | ||
local pos = self.Pos | ||
local scale = self.Scale | ||
|
||
for _ = 1, 5 do | ||
local Flash = emitter:Add( "effects/muzzleflash" .. math.random( 1, 4 ), self.Pos ) | ||
if Flash then | ||
Flash:SetVelocity( dir * 100 ) | ||
Flash:SetAirResistance( 200 ) | ||
Flash:SetDieTime( 0.15 ) | ||
Flash:SetStartAlpha( 255 ) | ||
Flash:SetEndAlpha( 0 ) | ||
Flash:SetStartSize( scale * 300 ) | ||
Flash:SetEndSize( 0 ) | ||
Flash:SetRoll( math.Rand( 180, 480 ) ) | ||
Flash:SetRollDelta( math.Rand( -1, 1 ) ) | ||
Flash:SetColor( 255, 255, 255 ) | ||
Flash:SetCollide( true ) | ||
end | ||
end | ||
|
||
for _ = 1, 10 * scale do | ||
local Dust = emitter:Add( "particle/particle_composite", pos ) | ||
if Dust then | ||
Dust:SetVelocity( dir * math.random( 100, 400 ) * scale + VectorRand():GetNormalized() * 300 * scale ) | ||
Dust:SetDieTime( math.Rand( 2, 3 ) ) | ||
Dust:SetStartAlpha( 230 ) | ||
Dust:SetEndAlpha( 0 ) | ||
Dust:SetStartSize( 50 * scale ) | ||
Dust:SetEndSize( 100 * scale ) | ||
Dust:SetRoll( math.Rand( 150, 360 ) ) | ||
Dust:SetRollDelta( math.Rand( -1, 1 ) ) | ||
Dust:SetAirResistance( 150 ) | ||
Dust:SetGravity( Vector( 0, 0, math.Rand( -100, -400 ) ) ) | ||
Dust:SetColor( 80, 80, 80 ) | ||
Dust:SetCollide( true ) | ||
end | ||
end | ||
|
||
for _ = 1, 7 * scale do | ||
local Dust = emitter:Add( "particle/smokesprites_000" .. math.random( 1, 9 ), pos ) | ||
if Dust then | ||
Dust:SetVelocity( dir * math.random( 100, 400 ) * scale + VectorRand():GetNormalized() * 400 * scale ) | ||
Dust:SetDieTime( math.Rand( 1, 3 ) * scale ) | ||
Dust:SetStartAlpha( 50 ) | ||
Dust:SetEndAlpha( 0 ) | ||
Dust:SetStartSize( 80 * scale ) | ||
Dust:SetEndSize( 100 * scale ) | ||
Dust:SetRoll( math.Rand( 150, 360 ) ) | ||
Dust:SetRollDelta( math.Rand( -1, 1 ) ) | ||
Dust:SetAirResistance( 250 ) | ||
Dust:SetGravity( Vector( math.Rand( -200, 200 ), math.Rand( -200, 200 ), math.Rand( 10, 100 ) ) ) | ||
Dust:SetColor( 90, 85, 75 ) | ||
Dust:SetCollide( true ) | ||
end | ||
end | ||
|
||
for _ = 1, 12 * scale do | ||
local Debris = emitter:Add( "effects/fleck_cement" .. math.random( 1, 2 ), pos ) | ||
if Debris then | ||
Debris:SetVelocity( dir * math.random( 0, 700 ) * scale + VectorRand():GetNormalized() * math.random( 0, 700 ) * scale ) | ||
Debris:SetDieTime( math.random( 1, 2 ) * scale ) | ||
Debris:SetStartAlpha( 255 ) | ||
Debris:SetEndAlpha( 0 ) | ||
Debris:SetStartSize( math.random( 5, 10 ) * scale ) | ||
Debris:SetRoll( math.Rand( 0, 360 ) ) | ||
Debris:SetRollDelta( math.Rand( -5, 5 ) ) | ||
Debris:SetAirResistance( 40 ) | ||
Debris:SetColor( 60, 60, 60 ) | ||
Debris:SetGravity( Vector( 0, 0, -600 ) ) | ||
Debris:SetCollide( true ) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
AddCSLuaFile! | ||
|
||
DEFINE_BASECLASS "base_point" | ||
|
||
ENT.Type = "point" | ||
ENT.Spawnable = false | ||
|
||
|
||
ENT.Initialize = => | ||
-- Do nothing | ||
|
||
ENT.UpdateTransmitState = -> | ||
TRANSMIT_NEVER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include "shared.lua" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AddCSLuaFile "cl_init.lua" | ||
AddCSLuaFile "shared.lua" | ||
include "shared.lua" | ||
|
||
ENT.Base = "base_cfc_powerup" | ||
ENT.Powerup = "powerup_groundpound" | ||
ENT.Color = Color 125, 80, 95 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ENT.Base = "base_cfc_powerup" | ||
|
||
ENT.Type = "anim" | ||
ENT.PrintName = "Groundpound Powerup" | ||
ENT.Purpose = "Crouch to fall quickly and create a shockwave on impact" | ||
ENT.Category = "Powerups" | ||
|
||
ENT.Spawnable = true | ||
ENT.AdminOnly = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
icolOrange = Color 255, 80, 0, 255 | ||
|
||
killicon.Add "cfc_powerup_hotshot_inflictor", "vgui/hud/cfc_powerup_hotshot", icolOrange | ||
killicon.Add "cfc_powerup_groundpound_inflictor", "vgui/hud/cfc_powerup_groundpound", icolOrange | ||
killicon.Add "cfc_powerup_thorns_inflictor", "vgui/hud/cfc_powerup_thorns", icolOrange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.