AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Remove slow down when player hurt (https://forums.alliedmods.net/showthread.php?t=304752)

Little Endian 01-26-2018 12:27

Remove slow down when player hurt
 
Hi,

I would like to get your input on this. I am writing a mod for CSGO in the vein of the ZM.
By default in CSGO, every time a player gets hurt, it automatically slows him and this puts zombies at a huge disadvantage (they can't approach the survivors easily).
I would like to remove that effect.
I tried pre-hooking player_hurt and returning Plugin_Handled but it doesn't seem to work.

Do you guys have any idea how I could manage to do this?

Thanks in advance.

hmmmmm 01-26-2018 13:31

Re: Remove slowing down when player hurt
 
Theres a hidden convar called mp_tagging_scale. Set it to 0 and it should stop them from being "tagged".

Franc1sco 01-26-2018 13:47

Re: Remove slowing down when player hurt
 
sm_cvar mp_tagging_scale "20"

Info here: https://forums.alliedmods.net/showthread.php?t=261392

_GamerX 01-26-2018 18:00

Re: Remove slowing down when player hurt
 
Quote:

Originally Posted by Franc1sco (Post 2574308)
sm_cvar mp_tagging_scale "20"

Info here: https://forums.alliedmods.net/showthread.php?t=261392

Is possible this to custom player not for all?

CamerDisco 01-26-2018 19:55

Re: Remove slowing down when player hurt
 
Quote:

Originally Posted by _GamerX (Post 2574346)
Is possible this to custom player not for all?

Did you try https://sm.alliedmods.net/new-api/co...endConVarValue ?

Little Endian 01-26-2018 20:21

Re: Remove slow down when player hurt
 
Thank you all very much for your answers.

At the time of writing this, it didn't work on my server. What I've tried so far:
  • putting sm_cvar mp_tagging_scale "0" in server.cfg
  • putting sm_cvar mp_tagging_scale "0" in gamemode_competitive_server.cfg
  • putting sm_cvar mp_tagging_scale "0" in sourcemod/sourcemod.cfg
  • putting mp_tagging_scale "0" in sourcemod/sourcemod.cfg
  • directly typing sm_cvar mp_tagging_scale "0". Replies with [SM] Changed cvar "mp_tagging_scale" to "0" but does not actually remove tagging

Franc1sco 01-26-2018 20:41

Re: Remove slow down when player hurt
 
Quote:

Originally Posted by Little Endian (Post 2574363)
Thank you all very much for your answers.

At the time of writing this, it didn't work on my server. What I've tried so far:
  • putting sm_cvar mp_tagging_scale "0" in server.cfg
  • putting sm_cvar mp_tagging_scale "0" in gamemode_competitive_server.cfg
  • putting sm_cvar mp_tagging_scale "0" in sourcemod/sourcemod.cfg
  • putting mp_tagging_scale "0" in sourcemod/sourcemod.cfg
  • directly typing sm_cvar mp_tagging_scale "0". Replies with [SM] Changed cvar "mp_tagging_scale" to "0" but does not actually remove tagging

Try with value 20 or 7

Little Endian 01-26-2018 21:16

Re: Remove slow down when player hurt
 
Quote:

Originally Posted by Franc1sco (Post 2574369)
Try with value 20 or 7

You are absolutely right. I thought this was the other way around. Higher values decrease the tagging. Thanks for that!

The only way I got it working as of now is with sm_rcon though (sm_rcon sm_cvar mp_tagging_scale 20). I'm looking for a more durable solution (i.e. cfg files).

Franc1sco 01-26-2018 21:20

Re: Remove slow down when player hurt
 
Quote:

Originally Posted by Little Endian (Post 2574377)
You are absolutely right. I thought this was the other way around. Higher values decrease the tagging. Thanks for that!

The only way I got it working as of now is with sm_rcon though (sm_rcon sm_cvar mp_tagging_scale 20). I'm looking for a more durable solution (i.e. cfg files).

sm_cvar mp_tagging_scale 20 into cfg/sourcemod/sourcemod.cfg never fail.

Little Endian 01-26-2018 21:37

Re: Remove slow down when player hurt
 
Something must have been tampering with the cvar. I rebooted my server and it now works like a charm! Thanks!

While I'm at it, I saw a post on Reddit:

Quote:

But that 5% original speed reduction is overridden by the FlinchVelocityModifierLarge and FlinchVelocityModifierSmall values in each weapon scripts. You get a higher percentage of original movement speed lost after being hit, not a measly 5%.

You can already increase tagging without this hidden command. Tagging slowdown for each weapon is controlled by its respective weapon script's FlinchVelocityModifierLarge and FlinchVelocityModifierSmall values.

FlinchVelocityModifierLarge controls the amount of slowdown when shot in the head,chest,arm, abdomen/pelvis whilst FlinchVelocityModifierSmall controls the slowdown from being shot in the legs. The lower the value given, the higher the velocity penalty from being shot. If you reduce the number to 0.10 you get very heavy 1.6 style tagging.

Also not many people know this about GO where if you get tagged the acceleration straight after becomes much slower than normal. In spite what everyone says about GO's acceleration being faster than 1.6/Source, the acceleration after tagging is a special case and is in fact much slower than 1.6/CSS accleration. cl_showpos 1 shows this. It's the rather high values given to FlinchVelocityModifierLarge and FlinchVelocityModifierSmall that gives GO it's rather weak tagging which by the way CSS has as well despite that game having slower 1.6 style acceleration.
Have you already explored this possibility? While sm_cvar mp_tagging_scale does seem to work pretty well, I feel like there is still a bit a drag. Might it be because of it? Values of sm_cvar mp_tagging_scale above 20 don't seem to lower it any further (tried up to 255).


All times are GMT -4. The time now is 02:22.

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