AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Costly Sprint / Dash v2.2 [22-December-2022] (https://forums.alliedmods.net/showthread.php?t=340323)

NoroHime 11-09-2022 05:53

[L4D & L4D2] Costly Sprint / Dash v2.2 [22-December-2022]
 
16 Attachment(s)
about
  • hold Shift to sprint like another game, or double tap the forward key
  • consume the health if keep dashing or use stamina
  • wont consume if under adrenaline duration
  • dashing sounds (l4d2 only)
  • stop dashing when health gets lower than value

ConVar

PHP Code:

// hurt survivor even he under adrenaline duration
costly_sprint_ache_adren "0"

// damage to hurt survivor every interval, less than 1 will be randomly
costly_sprint_ache_amount "2.0"

// interval(seconds) of hurt survivor when keep dashing
costly_sprint_ache_interval "1.0"

// boost rate of dashing
costly_sprint_boost "1.5"

// stop dashing when health under this value
costly_sprint_limp "4.0"

// boost mode 0=L4D_OnGet*TopSpeed(more compatibility)
// 1=m_flLaggedMovementValue(most smoothly, only suggest on *_tap 1)
costly_sprint_mode "0"

// does play dash sound for dashing
costly_sprint_sound "1"

// duration(seconds) of stamina mode, set duration use stamina mode to instead ache mode
costly_sprint_stamina "0"

// factor to scale speed when used up stamina during penelty
costly_sprint_stamina_penalty_rate "0.5"

// stamina progress bar position, 1=center text 2=hint text 0=disabled
costly_sprint_stamina_progress "1"

// stamina recovery rate
costly_sprint_stamina_recovery_rate "0.5"

// method to trigger dash 0=shift+move key 1=double tap move key
costly_sprint_tap "0"

// interval(seconds) to trigger double tap
costly_sprint_tap_interval "0.3" 


changelog
  • v1.0 just releases; 9-November-2022
  • v1.1
    new ConVar *_mode to control boost work way, more compatible or smoothy,
    new ConVar *_tap to control how to trigger dash, shift+MoveKey or double tap forward key,
    add support "[L4D & L4D2] Lagged Movement" if set *_mode to 1 ; 13-November-2022
  • v1.1.1 fix *_limp no work proper, optimize code more robust thanks to Silvers; 13-November-2022 (2nd time)
  • v1.2
    new ConVar *_tap_interval to control interval time between double tap forward key,
    make damage randomly if *_ache_amount less than 1; 14-November-2022
  • v2.0 new features, fixes:
    - new Stamina mode, to instead hurt mode, if stamina used up, survivor speed gets down:
    - new ConVar *_stamina to control max stamina duration, if set then use stamina mode
    - new ConVar *_stamina_penalty_rate to control panalty move speed,
    - new ConVar *_stamina_progress to print stamina progress text position,
    - new ConVar *_stamina_recovery_rate to scale stamina recovery ratio,
    - ConVars *_ache_* also control the stamina mode,
    - fix key not detecting on incapped,
    - fix double tap mode not work,
    - remove ConVar *_sound_delay,
    - double tap mode now can accept any move key,
    - simplify codes, remove useless sounds because they sounds same,
    - uploaded translation file for stamina mode; 13-December-2022
  • v2.0.1 optimizes:
    - optimize double tap logic,
    - clear state when player unavailable; 13-December-2022 (2nd time)
  • v2.1 new features:
    - new Command +dash -dash let player work on "bind shift +dash"; 21-December-2022
  • v2.2 fixes:
    - add Command sm_dashstart, sm_dashstop for dedicated server,
    - fix dash command wrong speed on *_tap == 0,
    - when set _ache_adren as 0, adrenaline state will ignore *_limp; 22-December-2022

Installation

little_froy 11-09-2022 10:35

Re: [L4D & L4D2] Costly Sprint / Dash v1.0 [9-November-2022]
 
i assume if use OnPlayerRunCmd, you can deny shift buttons effect by buttons &= ~IN_SPEED and make it more smoothly.

NoroHime 11-09-2022 11:50

Re: [L4D & L4D2] Costly Sprint / Dash v1.0 [9-November-2022]
 
Quote:

Originally Posted by little_froy (Post 2792493)
i assume if use OnPlayerRunCmd, you can deny shift buttons effect by buttons &= ~IN_SPEED and make it more smoothly.

i was try it, but something other plugin or game behavior still need shift key, so for the compatibility here.
and when remove the IN_SPEED, movement will causes screen stuttering, i guess this problem from Network Latency Prediction.
in comparison, L4D_OnGetWalkTopSpeed work not bad here.

the alternative solution is using NetProp m_flLaggedMovementValue, but it causes stuttering at dashing stop, and some jump to air problem,
i was seen Silvers fix that problem on [L4D & L4D2] Weapons Movement Speed, im trying learn from that :C

NoroHime 11-13-2022 05:21

Re: [L4D & L4D2] Costly Sprint / Dash v1.1 [13-November-2022]
 
update, now smoothy movement work no bad when set *_mode 1 and *_tap 1

Quote:

PHP Code:

// boost mode 0=L4D_OnGetWalkTopSpeed(more compatibility)
// 1=m_flLaggedMovementValue(most smoothly, only suggest on *_tap 1)
costly_sprint_mode "0"

// method to trigger dash 0=shift+move key 1=double tap W
costly_sprint_tap "0"

// interval(seconds) to trigger double tap
costly_sprint_tap_interval "0.3" 


changelog
  • v1.1
    new ConVar *_mode to control boost work way, more compatible or smoothy,
    new ConVar *_tap to control how to trigger dash, shift+MoveKey or double tap forward key,
    add support "[L4D & L4D2] Lagged Movement" if set *_mode to 1 ; 13-November-2022
  • v1.1.1 fix *_limp no work proper, optimize code more robust thanks to Silvers; 13-November-2022 (2nd time)
  • v1.2
    new ConVar *_tap_interval to control interval time between double tap forward key,
    make damage randomly if *_ache_amount less than 1; 14-November-2022

Installation

NoroHime 12-12-2022 15:47

Re: [L4D & L4D2] Costly Sprint / Dash v2.0 [13-December-2022]
 
1 Attachment(s)
finally updated stamina mode, to instead hurt mode, if stamina used up, survivor speed gets down
Quote:


ConVar

PHP Code:

// duration(seconds) of stamina mode, set duration use stamina mode to instead ache mode
costly_sprint_stamina "0"

// factor to scale speed when used up stamina during penelty
costly_sprint_stamina_penalty_rate "0.5"

// stamina progress bar position, 1=center text 2=hint text 0=disabled
costly_sprint_stamina_progress "1"

// stamina recovery rate
costly_sprint_stamina_recovery_rate "0.5" 

changelog
  • v2.0 new features, fixes:
    - new Stamina mode, to instead hurt mode, if stamina used up, survivor speed gets down:
    - new ConVar *_stamina to control max stamina duration, if set then use stamina mode
    - new ConVar *_stamina_penalty_rate to control panalty move speed,
    - new ConVar *_stamina_progress to print stamina progress text position,
    - new ConVar *_stamina_recovery_rate to scale stamina recovery ratio,
    - ConVars *_ache_* also control the stamina mode,
    - fix key not detecting on incapped,
    - fix double tap mode not work,
    - remove ConVar *_sound_delay,
    - double tap mode now can accept any move key,
    - simplify codes, remove useless sounds because they sounds same,
    - uploaded translation file for stamina mode; 13-December-2022
  • v2.0.1 optimizes:
    - optimize double tap logic,
    - clear state when player unavailable; 13-December-2022 (2nd time)
  • v2.1 new features:
    - new Command +dash -dash let player work on "bind shift +dash"; 21-December-2022
  • v2.2 fixes:
    - add Command sm_dashstart, sm_dashstop for dedicated server,
    - fix dash command wrong speed on *_tap == 0,
    - when set _ache_adren as 0, adrenaline state will ignore *_limp; 22-December-2022


Installation
  • optional put l4d_costly_sprint.phrases on /translations/


Zonehxoz 12-26-2022 19:09

Re: [L4D & L4D2] Costly Sprint / Dash v2.2 [22-December-2022]
 
It's a bit weird having to see someone "sprint" while using the walking animation though, would be nice if it was just the normal running animation instead, i know it doesn't matter as much in firstperson but in thirdperson looks kinda meh, either way pretty neat sprinting system though.


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

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