Raised This Month: $ Target: $400
 0% 

8 survivors in the rescue vehicle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-08-2020 , 01:13   Re: 8 survivors in the rescue vehicle
Reply With Quote #11

Here's a plugin I wrote a few days ago that supports both Left 4 Dead games and requires Left 4 DHooks. On every finale map, it looks for info_survivor_position entities and saves their coordinates in a simple array. Once the map starts, an X number of extra survivor positions are created (determined by l4d_esfp_amount [default is 4 for a total of 8 survivor positions]) while looping through the array for coordinates. So far, every survivor that stays alive after the rescue vehicle leaves count as "escaped" in the stats crawl.

Note #1: Death Toll finale doesn't seem to have any info_survivor_positions so survivors sometimes get left behind when the boat leaves and the stats crawl doesn't always count them as "escaped." To fix this, I hooked the trigger_finale's (and finale_trigger in some cases) "EscapeVehicleLeaving" entity output to warp all survivors back to the saferoom with godmode when no info_survivor_positions are found by the time they escape, and most of the time it counts towards them escaping.

The only downside to this is when a custom campaign may have the same feature as Dark Carnival's finale where clients stuck in the hallway under the bleachers when the finale starts will get kicked. Fortunately for Dark Carnival's finale, there are info_survivor_positions so the "warp all survivors back to the saferoom with godmode" feature never triggers for that finale.

Note #2: Apparently some finales create up to 12 info_survivor_positions but extra survivors are never warped to them. My guess is because some of them are flagged for different purposes, so the function that VALVe uses to warp survivors to info_survivor_position entities never use them. Thankfully, the ones that this plugin creates are detected to be used for extra survivors. That's why the convar l4d_esfp_amount is used to determine the number of extra survivor positions to create rather than simply counting the number of positions already present and comparing it to the number of survivors. If only it were that simple...



There's definitely a much better method out there but this is all I could come up with for now.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_esfp.sp - 423 views - 7.2 KB)
__________________

Last edited by Psyk0tik; 11-12-2020 at 21:26. Reason: Updated the code.
Psyk0tik is offline
 


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 05:24.


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