AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [L4D2 | ANY?] ShockWave Inc (https://forums.alliedmods.net/showthread.php?t=343267)

King_OXO 07-05-2023 19:05

[L4D2 | ANY?] ShockWave Inc
 
1 Attachment(s)
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

Miamivhc 07-07-2023 23:53

Re: [L4D2 | ANY?] ShockWave Inc
 
Where can I test it?

King_OXO 07-08-2023 19:03

Re: [L4D2 | ANY?] ShockWave Inc
 
Quote:

Originally Posted by Miamivhc (Post 2806912)
Where can I test it?

This here is a script and compilation include for plugins, if you have any intention of using this as a plugin, you are wrong XD. Use the test I did, download it in the "Get Plugin" option and move it to the sourcemod/plugins folder in l4d2

LisaSutcliffe 07-19-2023 01:44

Re: [L4D2 | ANY?] ShockWave Inc
 
Thank you for sharing, I will surely try it out and if I face any issues, I will ask you.I was struggling with my research paper and fortunately, I discovered the website https://customwriting.com/buy-research-paper, which has the best writers who can assist me with my tasks. With their help, I can now concentrate on other important things in my life without worrying about my work. Their reliable service and expert writers have made my academic life much easier, and I am grateful for their support.

Silvers 07-19-2023 10:46

Re: [L4D2 | ANY?] ShockWave Inc
 
Remove the IsClientConnected check. This is covered by IsClientInGame. It should also be "client <= MaxClients" not "client < MaxClients"

King_OXO 07-21-2023 12:29

Re: [L4D2 | ANY?] ShockWave Inc
 
Quote:

Originally Posted by Silvers (Post 2807404)
Remove the IsClientConnected check. This is covered by IsClientInGame. It should also be "client <= MaxClients" not "client < MaxClients"

Fixed

King_OXO 07-21-2023 13:22

Re: [L4D2 | ANY?] ShockWave Inc
 
Quote:

Originally Posted by LisaSutcliffe (Post 2807387)
Thank you for sharing, I will surely try it out and if I face any issue, I will ask you.

Ty


All times are GMT -4. The time now is 11:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.