hi. really enjoy the plugin for a while now, but i've overlooked this issue and need some help:
reproduce issue:
1. set scuffle_staydown cvar = 1
2. become incap by special infected
3. scuffle out before you go into downstate
4. become incap by special infected again
5. you can still scuffle out - no cooldown applied
6. now, become incap by going into downstate or ledge
7. scuffle out
8. become incap by special infected
9. as you can see, cooldown is applied like normal now.
i'd like it so that each successful scuffle applies the cooldown for consistency if scuffle_staydown = 1.
if scuffle_staydown = 0, cooldown applied through all successful scuffles, which is how i've set up the cvar this whole time. though ideally, i would've liked scuffle_staydown = 1 for difficulty reasons.
i'm having a hard time trying to figure out the logic of the code, so help would be very appreciated. thanks in advance.
cvars:
PHP Code:
// This file was auto-generated by SourceMod (v1.10.0.6502)
// ConVars for plugin "scuffle.smx"
// -1: Infinite. >0: Shared with attack, ledge and ground tokens of value -1.
// -
// Default: "-1"
scuffle_any "-1"
// -1: Infinite. >0: Times a survivor can revive from an SI attack hold.
// -
// Default: "-1"
scuffle_attack "-1"
// Charger stagger and secondary attack block time.
// -
// Default: "3.5"
scuffle_chargerstagger "3.5"
// Cooldown (no reviving) between self-revivals.
// -
// Default: "10"
scuffle_cooldown "25"
// Overall time to spread holds and taps.
// -
// Default: "30.0"
scuffle_duration "15.0"
// -1: Infinite. >0: Times a survivor can revive from the ground.
// -
// Default: "-1"
scuffle_ground "-1"
// Time deduced on server frame when holding scuffle_shiftbit.
// -
// Default: "0.1"
scuffle_holdtime "0.1"
// Hunter stagger and secondary attack block time.
// -
// Default: "3.0"
scuffle_hunterstagger "3.0"
// Hurt survivor this amount per second (applies on self revival).
// -
// Default: "1"
scuffle_hurt "1"
// Jockey stagger and secondary attack block time.
// -
// Default: "1.2"
scuffle_jockeystagger "1.2"
// Chance of killing an SI when reviving.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "100.000000"
scuffle_killchance "0"
// -1: Off: >=0: Stop self revivals at this strike.
// -
// Default: "2"
// Minimum: "-1.000000"
// Maximum: "2.000000"
scuffle_lastleg "-1"
// -1: Infinite. >0: Times a survivor can revive from a ledge.
// -
// Default: "-1"
scuffle_ledge "-1"
// Time added on server frame when missing scuffle_shiftbit.
// -
// Default: "0.2"
scuffle_losstime "0.2"
// Stop self revivals at this health.
// -
// Default: "0"
scuffle_minhealth "0"
// Semicolon separated items and health e.g., 'item1=temphealth;item2'. <------ pills;adrenaline;kit etc etc
// -
// Default: ""
scuffle_requires ""
// Shift bit for revival see https://sm.alliedmods.net/api/index.php?fastload=file&id=47&
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "25.000000"
scuffle_shiftbit "1"
// Zero based slot search order (slot 1 is ignored). <------ 43 = pills slot + first aid slot
// -
// Default: ""
scuffle_slots ""
// Smoker stagger and secondary attack block time.
// -
// Default: "1.2"
scuffle_smokerstagger "1.2"
// 0: Break SI hold and get up. 1: Break SI hold and stay down.
// -
// Default: "0"
scuffle_staydown "1"
// Time deduced on server frame when tapping scuffle_shiftbit.
// -
// Default: "1.5"
scuffle_taptime "0.6"
EDIT: i think i've fixed my issue. took a while to understand the logic but just added a few lines and it seems to work for me. scuffling will now enter cooldown state whenever a successful scuffle occurs. also placed some code to remove the progress bar if there is no scuffle progress - it was a while ago but i think i borrowed the code from one of Marttt's plugins, so credit to them for that. hope this helps someone.
EDIT #2: i've also included a very simple plugin that notifies you via hint whenever you are being revived/have stopped being revived. might be useful since the progressbar isn't always present with this edit.