Freeze all props in volume / Teleport Trouble

Here’s the deal: I’m making a very large map that, due to Hammer’s space requirements, must be segmented vertically. Therefore, I need a way to teleport between regions. Teleporters for people or simple objects are simple, and can be very easily disguised. Teleporting Garry’s Mod contraptions, however, is a different story. The parts cannot be teleported one at a time. Rather, the whole thing must be enclosed in the teleporter volume before enabling it. To do this, I have “freight teleporters” which work perfectly well, if not for one small detail:

Attempts to teleport anything with a constraint (like two barrels welded together) will result in the immediate destruction of the contraption. Much of it will end up stretched out inside the void between the two teleporters. Breakable objects break; exploding objects explode. However, if ALL of the constrained props are frozen with the Physics Gun, everything teleports normally.

So there lies my question to you: Is there a way to freeze all props in a volume, and if not, is there a different way to fix my problem?

Thingshappen successfully teleported a simple contraption with hammer. I’d talk to him.

Like that, except the brush would be split up into segments prior to telports on the map.

Sorry if it’s hard to explain.

If you really care and want me to explain in detail, which you most likely don’t, PM me.

Make the trigger nearer the map’s edge, and the teleport that’s activated further away from the edge, that way you have more chance of the whole contraption being in the teleport brush when you hit the trigger, than if you just used a trigger the same size as the teleport brush.

I think you’re all misunderstanding the question. The freight teleporter is a room with a door. A trigger_teleport covers the entire room, and will only be activated if three conditions are met:

  1. The door is closed
  2. The door of the opposite teleporter is closed
  3. The other teleporter is empty
  4. A button is pressed.

The contraption is fully enclosed in the teleport trigger when it’s activated. That’s not the problem. The problem is that the physics engine craps itself when teleporting two objects constrained together, even though both are within the teleport volume. The solution would be to freeze all props in the volume before teleporting, but I don’t know how to do that.

SOLUTION FOUND!!! It’s a bit convoluted - more of a hack than anything else, but it seems to be working! Here’s what I’ve done:

I created an lua_run entity simply called “lua”, then a trigger_multiple over the same area as the trigger_teleport. It starts disabled. When the teleport cycle is activated, this trigger is activated 0.01 seconds before the teleport trigger. The trigger_multiple is set to activate for physics objects only. Its outputs are:

OnStartTouch > lua > RunPassedCode > ACTIVATOR:GetPhysicsObject():EnableMotion(false)
OnEndTouch > lua > RunPassedCode > ACTIVATOR:GetPhysicsObject():EnableMotion(true)

I tested this in a test map, and it seems to be working. I’m now compiling my full map to confirm. :smiley:

If the Lua seems like too much of a hack, it can probably be done without. Add to the trigger_multiple the output:

OnStartTouch | !activator | DisableMotion
OnEndTouch | !activator | EnableMotion

Alright. I’ve been mucking about this for a week, and I’ve got one major issue: Only pure physics props freeze before the teleport. Vehicles, physics-based NPCs (the manhack, rollermine, and scanner), SENTs (including everything from Wiremod), and pretty much everything else that can’t be made with the Prop Spawner fails to freeze in place. I’ve tried it the way I mentioned before as well as Terrenteller’s way. Both produce the same result, and everything else I’ve tried has worked either just the same or not at all.