Raised This Month: $ Target: $400
 0% 

[L4D, L4D2] No Death Check Until Dead


Post New Thread Reply   
 
Thread Tools Display Modes
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-15-2010 , 13:31   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #21

Quote:
1. What is this supposed to do on a 10vs10 server ?
2. Why is MissionWillBeLost true if DeadGuys = 3?
3. Why do you consider a bot as "DeadGuy" ?
1. Currently, this only works on a server where the maximum amount of survivors is four players. There are so many other plugins and other ways of allowing more than four survivors that I haven't yet implemented this feature in the death check.

2. MissionWillBeLost determines whether or not director_no_death_check will be set to 0 the next time a human player dies. If the only player still alive is a human, MissionWillBeLost gets set to true. If another living human player is put into the game, MissionWillBeLost gets set to false. If it's false, the next time a human player dies, the cvar does not get reset to 0. Right now I'm using the number 3 for this check because it's only intended for servers with 4 survivor players. Three dead humans, bots, or idle players will make the death check kick in when the fourth one gets killed.

3. Bots and idle players are considered "deadguys" because, by default, they don't go on playing when there are no more human players alive. If you were playing on a map with no other human players and you die, the mission is restarted. This is how the game works without plugins. I can't imagine anyone would want the game to allow bots to continue playing when all human players are dead, but if you really want that feature, I believe there is a cvar which allows them to keep playing despite all human players being dead, and this plugin could be altered to check for that.

Last edited by chinagreenelvis; 11-15-2010 at 13:37.
chinagreenelvis is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-15-2010 , 18:34   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #22

Update: Fixed a bug where the death check stopped working after the first map of a campaign.
chinagreenelvis is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 11-16-2010 , 06:08   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #23

There are some plugins, especially "takeover 0.8" which allows you to takeover a living bot after you died. I think your plugin is still capable of getting used in multislot servers.
1.
You wrote that you set the value to 3 because of max survivors = 4.
So I could set this value to 9, as we have 10 survivors, right ? If this works you could create a cvar which handles the survivor count, so the plugin can be used for ANY survivor count instead of 4 only.
2.
Remove the check for bots. Without this check for bots the round continues and we can type !takeover to continue as the bot. My aim is that this plugin ONLY ends a round when EVERYBODY is DEAD
Would this work or do you see any complications?

Last edited by Skorpion1976; 11-16-2010 at 06:18.
Skorpion1976 is offline
TastyCheese
Member
Join Date: Nov 2010
Old 11-16-2010 , 06:16   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #24

Quote:
Originally Posted by chinagreenelvis View Post
Right now I'm using the number 3 for this check because it's only intended for servers with 4 survivor players. Three dead humans, bots, or idle players will make the death check kick in when the fourth one gets killed..
This got me wondering... Let's say me and a friend want to play a 2-player game, so one of us hosts and kicks the two bots, leaving only us two. Will the chapter restart if we both get killed or will it be stuck waiting for a third player (that doesn't exist) to die?
TastyCheese is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-16-2010 , 09:53   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #25

I could create a cvar which toggles the bot-check for people who want to use that takeover option, or for people who just want to let the bots keep on going for whatever reason.

As for the number of players, I'm sure there's probably an easy to way to set this dynamically. I would think that if you had less than four it would probably not work in it's current incarnation. I'll look into this. Creating a cvar for extra players is an option but making it dynamic based on the total number of survivors in play (bot and human alike, both dead and alive) would kill two birds with one stone.
chinagreenelvis is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-16-2010 , 16:36   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #26

Update: Toggle for including or excluding bots and idle players added. The plugin also now works with any number of players.

The number of players fix was easier than I thought it would be. Now, instead of checking for the number of dead players, it checks for the number of alive ones. When that number drops to one, the boolean for the death check gets set to true. When the number goes above or below that, it's reset to false.
chinagreenelvis is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-18-2010 , 20:06   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #27

Update 1.4.1 - Possible bugfix, we'll see it it works. It's uploaded either way.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_2_deathcheck.sp - 572 views - 5.8 KB)

Last edited by chinagreenelvis; 11-18-2010 at 23:37.
chinagreenelvis is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 11-18-2010 , 22:33   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #28

Yeah, found a bug in the previous version, probly the same one u discovered. If connected with only one player in game, all players dead, the map restart works. If more than one player is in game the mod will not restart the map after all players are dead, tested both option 1 and 2. Will be testing the new version tomorrow and will get back to you. Btw thanks for the great plugin, I'm pretty sure the one before the last worked fine even with 4+ players, tested on helms deep map(not 100% sure though. Anyways, I will keep u posted on my findings.
MasterMind420 is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-18-2010 , 23:29   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #29

Odd. So this problem is from the latest versions only? I should start saving previous versions of these...
chinagreenelvis is offline
chinagreenelvis
Senior Member
Join Date: Dec 2009
Old 11-18-2010 , 23:41   Re: [L4D, L4D2] No Death Check Until Dead
Reply With Quote #30

I know exactly why it's not working. It's because I added that one extra "if" section to the player_death event and it doesn't like it. It's finicky about the number of calculations it has to go through before it works.

I may have to create two different versions of this: one that includes bots and one that excludes them. Otherwise I'll have to come up with a pretty creative workaround...
chinagreenelvis is offline
Reply



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 19:51.


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