This guide is how to set up the TURN_SWITCH and OBELISK puzzle from the Tomb Raider 4 level “Great Hypostyle Hall”.
This guide was adapted from the original by Fluen. The setup remains almost the same as the original TR4 engine, but a new object (OBELISK_CAGE)has been introduced so the engine does not check specifically for PUZZLE_COMBO1.
Objects #
Stage one: one PULLEY, its rope static, exactly three OBELISK, and three TURN_SWITCH.
Stage two: one OBELISK_CAGE in the centre, and three HAMMER placed at the end of the OBELISK.
Stage one: align the obelisks and unlock the pulley
Place the pulley and rope. Set pulley OCB 1 for a single pull and mark it invisible. The invisible flag makes it initially unusable; the puzzle clears that lock when solved.
Set up pulley triggers. Put the switch-trigger beneath the pulley and add triggers for objects it should activate.
Place exactly three obelisks, with sufficient space to turn. Set one of each OCB 1, 2, and 3.
- OCB 1: pointed end points west.
- OCB 2: pointed end points east.
- OCB 3: pointed end points south.
The engine checks OCB 1 at yaw ANGLE(180) (west), OCB 2 at yaw 0 (east), and OCB 3 at ANGLE(90) (south).
Pair each turn switch with an obelisk. Put the obelisk trigger and switch-trigger beneath each turn switch. The switch selects the obelisk animation for the push direction: clockwise starts animation 4, counter-clockwise starts animation 0. The obelisk applies its 90-degree yaw change at the corresponding animation endpoint, then refreshes its renderer pose after resetting the animation to avoid a one-frame stale pose.
Test the gate. The pulley becomes usable when there is exactly one obelisk for each OCB 1-3 and all are at the specified rotations. The OCB 2 obelisk refreshes the first pulley’s lock every frame, regardless of its trigger state.
Stage two: hammers, sparks, and cage
Place OBELISK_CAGE.
Place hammers. Each hammer is three blocks from its corresponding obelisk, where its lower end points when aligned. Set the hammers to OCB 2; at its hit frame it activates all three obelisks by OCB, independent of room or item order.
Trigger hammers from the pulley. Add hammer triggers beneath the pulley.
Pre-place any items you wish to spawn on the same square as the OBELISK_CAGE, and set it invisible in the editor (select item -> press O and check the invisible box). When the cage breaks, the code reveals this existing item; it does not spawn or move one. If it is absent, the cage still breaks but no reward appears.
Implementation limits #
Stage one requires exactly three obelisks with unique OCBs 1, 2, and 3. Additional obelisks, duplicate OCBs, or missing OCBs keep the pulley locked. Only the first pulley is updated.
Only the special OCB 2 obelisk runs puzzle initialization/control. The OCB 2 hammer activates all three obelisks; the special obelisk then emits the long-range effect toward the cage. The cage breaks after the charge-up even if Lara is not nearby.