Having to restart level when you die in any mod

Talk about multiplayer ZDoom games here.
Forum rules
Posts: 6
Joined: Mon Oct 11, 2021 1:46 pm

Having to restart level when you die in any mod

Post 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?
User avatar
Posts: 13393
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

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

Post 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.
User avatar
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Post 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.

Return to “Networking”