Raised This Month: $146 Target: $400
 36% 

L4D2 Last Survivor - No Special Infected


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kewie
Junior Member
Join Date: Jan 2025
Old 03-05-2025 , 06:23   L4D2 Last Survivor - No Special Infected
Reply With Quote #1

request: a script that removes all special infected and prevents them from spawning while there is only one survivor alive.

like this script that gives you some advantages when the other survivors are dead:
https://steamcommunity.com/sharedfil...?id=3302267126
kewie is offline
cacaopea
Member
Join Date: May 2019
Location: Viet Nam
Old 03-11-2025 , 04:53   Re: L4D2 Last Survivor - No Special Infected
Reply With Quote #2

if you want i will do it for you,free private plugin
cacaopea is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 03-11-2025 , 17:55   Re: L4D2 Last Survivor - No Special Infected
Reply With Quote #3

player_death -> check survivors alive if 1 -> left4dhooks stop spawns/convar change?
Drixevel is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 03-11-2025 , 18:19   Re: L4D2 Last Survivor - No Special Infected
Reply With Quote #4

Are you asking for vscript or Sourcemod plugin?
__________________
Spirit_12 is offline
kewie
Junior Member
Join Date: Jan 2025
Old 03-23-2025 , 10:21   Re: L4D2 Last Survivor - No Special Infected
Reply With Quote #5

Quote:
Originally Posted by Spirit_12 View Post
Are you asking for vscript or Sourcemod plugin?
Any script can be useful, I'm playing singleplayer/offline.
kewie is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 03-24-2025 , 15:08   Re: L4D2 Last Survivor - No Special Infected
Reply With Quote #6

I did not do much testing on this one, but it should do the trick. Give it a whirl.

Create a new file in your vscript folder and name it coop.nut assuming you want this feature in coop gamemode.

PHP Code:
local TotalSurvivors Convars.GetFloat("survivor_limit")
local DeadSurvivors 0    

function OnGameEvent_player_deathparams )
{
    if( 
"userid" in params )
    {
        
local player GetPlayerFromUserIDparams.userid )
        if( 
player.IsSurvivor() )
        {
            
DeadSurvivors++
            if( 
DeadSurvivors == ( TotalSurvivors ) )
            {
                
DirectorScript.DirectorOptions.MaxSpecials <- 0
            
}
        }
    }
}

function 
OnGameEvent_survivor_rescuedparams )
{
    
DeadSurvivors--

__________________
Spirit_12 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin®
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Theme made by Freecode