The call comes directly from the trigger_touch.
Excellent, that's all I still needed. I forgot trigger brushes themselves can call scripts.
I've got a working setup now, attached it here. Brief description:
- This teleports the player and other entities, but not AI and func_static, between 2 locations.
- At each end there's a trigger_entityname brush (entityname: player1) and a trigger_touch. The trigger_entityname should be well within the trigger_touch.
- The player walks into the trigger_entityname brush. This calls a script which for a split-second actives the large trigger_touch brush, which registers all entities within its volume.
- Each entity that's not a func_static is teleported. The vector of the teleport is defined at the top of the script, i.e. '0 200 0' units.
1) the moveables do flash briefly, even if it's just a single crate, despite my efforts to keep the per-moveable script as short and simple as possible.
2) grabbed and dragged items only get teleported if they're within the trigger_touch. They could be added to the script as well, but I suspect this would visibly slow down its execution. This can be worked around by placing the initial trigger well within the trigger_touch.
3) when I teleported an AI via the trigger_touch he disappeared. Maybe I did something wrong, but I was going to use an AI-free antechamber in any case to avoid opening what's almost certainly a can of worms.
4) having moveables within the trigger_touch at mapstart may sometimes be problematic because the first teleportation activates their physics, potentially setting them in motion. This is fine if they're positioned in an orderly manner.
Edited by Dragofer, 07 January 2019 - 10:34 AM.