View Single Post
Author Message
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 11-09-2022 , 05:53   [L4D & L4D2] Costly Sprint / Dash v2.2 [22-December-2022]
Reply With Quote #1

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
Attached Thumbnails
Click image for larger version

Name:	stamina mode.jpg
Views:	488
Size:	74.5 KB
ID:	198472  
Attached Files
File Type: sp Get Plugin or Get Source (l4d_costly_sprint.sp - 550 views - 19.1 KB)
File Type: txt l4d_costly_sprint.phrases.txt (98 Bytes, 322 views)
__________________

Last edited by NoroHime; 12-21-2022 at 18:45.
NoroHime is offline