Need to know if this is possible. If, so, how do I do it?

Hello, my name is CodenameStirfry, and I had an amazing idea, but I need to know if it’s possible. So, let me start from the beginning, I go on a TTT server daily and I loved the idea that when you die, you can possess objects and mess with the living. But, unfortunately the owner of the server took that function off, as it caused many to crash. So I came up with an amazing idea to compensate for the loss of that feature. So here’s my idea, and I want you to tell me if it’s possible and how to do it. The idea is that, when you die, you are respawned in a lounge area where you are in a body, and you may walk around, and so on. You can spectate the round via tv monitors scattered around the map that show different people’s point of view. My server owner LOVES the idea, however he doesn’t think it will work because he says there’s a problem with “the transferring of the player” if that makes sense. Do any of you know if this is possible or if you can do it? It would be GREATLY appreciated. Thanks for your time.

          ~CodenameStirfry

It is technically possible, but will be a lot of hard work for such a small features.
You would have to recompile each map in rotation with said lounge, and this would mean your regular players will have to download the map each time.
But apart from that, everything else should be fine. Respawn the player in the new lounge, and add a Boolean to know if they are dead or not. And the T.V. screens should be easy enough with RT textures.

If it can be done, the guys at Coderhire would be the best people to call.

Thanks for that! I’m happy that this will work, however there is another problem with that. That is that when someone dies and you respawn, their dead body will leave the main map, correct? Because that can not happen in TTT. Is there any way to respawn them without their body disappearing. I know, just making it more impossible.

maybe you could try to save the data in a table put a ragdoll on the death players place “connect”(I don’t find another word to say it)the ragdoll with the table…but that will require alot of coding and alot of experience… but that should work.

I mean, their body is probably removed at the start of a new round, not when they respawn, so I don’t see any problem with this. But as before, the only really hard problem would be the lounge room. Either you’d have to add it to every TTT map you use, or somehow compile it in whenever the map is loaded up, which is probably much more complicated and would cause much longer loading times between matches.

jeah that’s maybe true dumb of me but you should check the code for that

It’s also possible to create “layers” on maps where players in one layer don’t see players in other layers, so it’s possible to just place monitors on map that record original layer so you don’t have to recompile maps.

Good point, Hadn’t thought of that! I think Overv did some work on it at some stage, might be worth your while searching it up.
And as for the body, just stop the game from removing it upon playerspawn.

It could definitely be done, however it’d be a fairly expensive job. You can look at how the tardis add-on is made for pointers

Thank you all for the support. But unfortunately my server’s owner got his paypal revoked due to him being under 18, so does anyone know somewhere or someone who would do it for free? Again, much thanks.

Sorry, no one will do that complicated job for free. You have to go to Coderhire.

Could always see if anyone is interested in steam cash to do it. Some are.

It’s possible someone “could” do it for free (read: could, not would) if they have permission to sell the addon (meaning it wouldn’t be unique to your server) and depending if there’s a market for such a thing.

I don’t think it would be overly complicated if you break it into parts.

You would need:

A model of the lounge itself - you can use propper and make the shell of the model, so it could be done in hammer without a huge amount of work. It would need space for several tv screens.

You will need to create a render target for each screen.

You will need a simple camera entity. It should have a pair networked variables - an integer and a string. The integer will be the number of screens watching it, and the string will be the name of the area it is looking at.

There is a gamemode hook that helps PVS along - you would loop through each camera, and if the screens watching it count is greater than zero, you would add its origin to the pvs.

Clientside, you would need to iterate over each screen and render the view from target camera to the screen’s rt material. Then, you would either draw a quad with that material or start a 3D2D camera and draw a textured rect of that material.

Next, you would spawn the model in a predetermined location on the map - preferably somewhere in the void and away from the rest of the map. In the above hook, you might need to add this position to the pvs as well.

Then, when a player becomes a spectator, you would teleport them inside the model, and if they leave the bounds of the model, teleport them back into it. Since they are outside the void, you would probably have to set their movetype to noclip so they can move around in the lounge itself.

It isn’t an ideal approach, but it would probably work and not require you to recompile the map unless actually walking around in the lounge is required.