Page 1 of 1

Having to restart level when you die in any mod

Posted: Fri Oct 15, 2021 5:02 pm
by fistfulfan
Does anyone know how to do this? Is there a mod that allows this?

Also are there any mods that you recommend using over multiplayer that enhance the game such as tilt+++ and nashgore?

Re: Having to restart level when you die in any mod

Posted: Fri Oct 15, 2021 7:25 pm
by Rachael
The only way this would be feasible is if the player had limited lives in multiplayer which is antithetic to the way Doom functions since it was written in a way from the very beginning that you are allowed unlimited lives. So the death would have to be permanent, at least, until every player dies - and then the level can restart with every player revived.

Zandronum implements this natively (it's called Survival Coop), but this is also possible with GZDoom as well by transforming the player into an object that is unable to interact with the world after the player is revived (such as a spectator, which will have to be coded manually, but it is possible through ZScript).

I do not know of yet any mods that implement this standalone but I know of at least one TC that has the mechanics for this - the Five Nights At Freddy's Doom Remake series. However, it does not implement a spectator mode - it just kills the player if they try to respawn.

Re: Having to restart level when you die in any mod

Posted: Thu Oct 21, 2021 7:18 pm
by Matt
It's definitely doable:

- Each map, spawn a thinker that tracks how many times players have died that map.

- after a certain number, each time a player respawns they're turned into a specatator. (This can be through morphing or messing around with flags, visbility, etc.).

- once everybody's a spectator all players' inventories are reset to default, the next map set to be the same as the current map, and an exit function is called.


EDIT: Of course you'll need to make an array of counters and some extra checks each death to handle deathmatch and TDM. It might be advisable to handle teams and individual deaths separately instead of trying to extrapolate team status from a single individual death count.