[L4D, L4D2] No Death Check Until Dead
21 Attachment(s)
The file has been updated to the version written by user DCX2.
This will prevent the mission from being lost simply because all remaining players have been incapacitated. Mission loss will not occur until there are no living survivors. This can be used on servers with any number of survivor players. There is also a switch to allow or disallow bots to continue without human survivors. Cvars deathcheck 1, 0: Disable plugin, 1: Enable plugin deathcheck_bots 1, 0: Mission will be lost if all human players have died, 1: Bots will continue playing after all human players are dead and can rescue them Recommended additional plugins
|
Re: [L4D] & [L4D2] No Death Check Until Dead
What does this pugin do? O.o cant understand it
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Very good idea, i hate it when the game ends when we all are incapped, because usually i "self help" myself immediatly after im incapped, thanks!
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Ah okey.... good thanks toe
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Either this plugin is wrong, or it interferes with something.
Map restart = crash of the server :/ And some errors - Code:
L 11/06/2010 - 22:09:35: [SM] Native "GetClientTeam" reported: Client index 0 is invalid |
Re: [L4D] & [L4D2] No Death Check Until Dead
This is a great idea. We use the self revive plugin from panxiohai and everytime we get up AFTER f....g round_end event :). Please include a check for client 0. I donīt have the code for that but some plugins had the same problems until they checked for index 0.
|
Re: [L4D] & [L4D2] No Death Check Until Dead
The events are also invoked for common infected, which have no clientid, because they are entities and therefore no team.
|
Re: [L4D] & [L4D2] No Death Check Until Dead
I tried this, and the chapter gets restarted when one person from the team dies, even if the three others are still incapped. I'm hoping this will get fixed because this plugin is exactly what I'm looking for :)
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Tasty, I think I know why that might be happening. I'll make the proper adjustments to the code tonight.
Die, I don't know what you're talking about with the CI. Could you explain? I wouldn't think that player_hurt or player_death have anything to do with the commons. Scorpion, I'd like to find out more about what you're saying. If you could find an example of it, please let me know. Herokim, I don't know where those errors are coming from. I don't get them at all. |
Re: [L4D] & [L4D2] No Death Check Until Dead
found here:https://forums.alliedmods.net/showthread.php?t=63759
PHP Code:
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Quote:
|
Re: [L4D] & [L4D2] No Death Check Until Dead
@Skorpion1976:
No, it's not enough. Always check against client == 0 or check with IsClientInGame(client) ;) @chinagreenelvis: You are right, commons do not have anything to do with players, but in fact the event player_death is also fired for common infected (god knows why...). (Not sure for player_hurt.) |
Re: [L4D] & [L4D2] No Death Check Until Dead
Because player_death is a generic source event that applies for all CBaseCombatCharacters (including commons)
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Ah, okay, thanks guys. I'll see if I can't whip this into shape.
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Eleven hours later and I came up with a fix. It's going to require a lot more coding, however, to make sure all the events are being considered.
It seems to be dependent entirely upon setting the convar, resetting it, and then setting it again only at specific points like incapacitation. The player_death event is the most finicky, since using it to reset the convar requires that the action not be preceded by any calculations. All in all, what should be very simple is extremely ridiculous and complicated. Does anyone know if it's possible to force the "mission_lost" event? Or to in any way force the survivors to lose the round? If so, that would make this much simpler. |
Re: [L4D] & [L4D2] No Death Check Until Dead
You can post here http://forums.alliedmods.net/forumdisplay.php?f=60
|
Re: [L4D] & [L4D2] No Death Check Until Dead
Update posted.
The new version should solve the problem of the mission being lost if all remaining players are incapped when one person dies. However, it doesn't seem to work properly until the mission is restarted. The first time all players are dead, the death-check doesn't manage to end the mission. I have no idea why and if anyone can figure out how to fix it, I'd greatly appreciate it. |
Re: [L4D] & [L4D2] No Death Check Until Dead
Nevermind, it's been fixed. As far as I can tell, it works perfectly now.
|
Re: [L4D, L4D2] No Death Check Until Dead
Minor error corrected. It still wasn't working properly but I believe it should be now.
|
Re: [L4D, L4D2] No Death Check Until Dead
Quote:
2. Why is MissionWillBeLost true if DeadGuys = 3? 3. Why do you consider a bot as "DeadGuy" ? PHP Code:
|
Re: [L4D, L4D2] No Death Check Until Dead
Quote:
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. |
Re: [L4D, L4D2] No Death Check Until Dead
Update: Fixed a bug where the death check stopped working after the first map of a campaign.
|
Re: [L4D, L4D2] No Death Check Until Dead
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? |
Re: [L4D, L4D2] No Death Check Until Dead
Quote:
|
Re: [L4D, L4D2] No Death Check Until Dead
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. |
Re: [L4D, L4D2] No Death Check Until Dead
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. |
Re: [L4D, L4D2] No Death Check Until Dead
1 Attachment(s)
Update 1.4.1 - Possible bugfix, we'll see it it works. It's uploaded either way.
|
Re: [L4D, L4D2] No Death Check Until Dead
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.
|
Re: [L4D, L4D2] No Death Check Until Dead
Odd. So this problem is from the latest versions only? I should start saving previous versions of these...
|
Re: [L4D, L4D2] No Death Check Until Dead
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... |
Re: [L4D, L4D2] No Death Check Until Dead
its weird, it seems to work fine but whenever i die and the are still bots out there the game keeps going, also when everyone dies including bots the game still keeps going, the game never ends anymore, how do i fix this?
|
Re: [L4D, L4D2] No Death Check Until Dead
Quote:
|
Re: [L4D, L4D2] No Death Check Until Dead
yeah i have no experience coding mods(currently), but will eventually learn. Would be glad to test anything u come up with. One thing i've learned because i use so many mods on my server is that backups will save the day. Although I can't say that for this mod because I didn't backup the original, if I had I would have uploaded it to you, won't make that mistake again though haha, I love this mod. Lets you fight it out till the bitter end....
|
Re: [L4D, L4D2] No Death Check Until Dead
I have the very first version of this plugin backed up, along with 1.4. If you want them, just leave a message :wink:
|
Re: [L4D, L4D2] No Death Check Until Dead
1 Attachment(s)
Update 1.4.2: I believe I've circumvented the death_check fail without removing any of the options. It's working for me so far.
|
Re: [L4D, L4D2] No Death Check Until Dead
Cool, seems to be working now with more than human player. I will test it on helms deep with 4+ players later today and post my findings.....so far so good...
|
Re: [L4D, L4D2] No Death Check Until Dead
Still not restarting with more than 1 players in game and everyone dead.....
|
Re: [L4D, L4D2] No Death Check Until Dead
yeah there's definately a problem with restarting the map after everyones dead same as previous release...
|
Re: [L4D, L4D2] No Death Check Until Dead
strange becuse it worked the first time i played...
|
Re: [L4D, L4D2] No Death Check Until Dead
ok so this is working, i just got done playing a game and it works with 3 people online, i tried it earlier with just 2 people and it didn't restart the map...so something is still wrong with it...
|
| All times are GMT -4. The time now is 22:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.