View Single Post
Author Message
King_OXO
Senior Member
Join Date: Dec 2020
Location: Brazil
Old 07-05-2023 , 19:05   [L4D2 | ANY?] ShockWave Inc
Reply With Quote #1

About:

This include brings you experiments to get to know "physics" in games, specifically in L4D2. I created functions for shock wave reactions from an explosion or whatever.

Functions:
PHP Code:
//Makes the shock wave throwing force value
stock float PowerThrow(float vPos[3], float InitPos[3], float StartPower)

//Makes the shock wave damage value
stock float PowerDamage(float vPos[3], float InitPos[3], float StartPower)

//Makes the shock wave time
stock float TimerReaction(float distancefloat Velocity)

//Makes the shock wave volume sound
stock float VolumeDistance(float vPos[3], float InitPos[3])

//Make the shock wave shake value
stock float ShakeFade(float vPos[3], float InitPos[3])

//Check if the shockwave can hit the client or entity
stock bool IfIsVisible(int entityfloat Pos1[3], float Pos2[3])

//Check if the client is valid
stock bool IsValidClient(int client)

//Precache the particles
stock void PrecacheParticle(const char[] sEffectName
Notes:

• The include is made for fun and sharing
• If there are any errors, post in the thread
• It uses the in-game distance and multiplies it with "*0.0254" for meters

Sample File

• Get Source

• Get Plugin

INCLUDE:

• Get Include
Attached Files
File Type: inc shockwave.inc (2.5 KB, 128 views)
__________________
My Noob Plugins

Discord:WhiteFire#1301
Steam:WhiteFire
Youtube

Last edited by King_OXO; 07-21-2023 at 12:29.
King_OXO is offline