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 distance, float 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 entity, float 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