paperlined.org
games > pc > Spelunky > levels > lemmings_notes > gates
document updated 15 years ago, on Feb 9, 2009

Goal: Make a one-way passage, that allows the player to go in one direction, but not the other. (the above picture allows the player to go right, but not left)

Layout: An oPushBlock is instance_created() to be 1 to 5 pixels higher than the oBrick below it.

Why this works:

The key thing that determines the direction of this one-way device is where the roof is located.

Variations: Trying to use an oBrick in place of the oPushBlock doesn't work. Spelunky realizes the player can get through, and allows them through without jumping. The key reason the oPushBlock prevents movement from the right (but oBrick doesn't) is that Spelunky thinks that because the player is bumping up against the side of the block, that the player wants to push the block. However, since it's embedded in the floor, the block isn't going to go anywhere. So they're stuck pushing the block if they come from the right.

(if they come from the left, they'll also be stuck pushing the block... but they also have the option to try to jump up a bit, and avoid the pushing stickiness)

Last version confirmed in: Confirmed this works in v0.99.5.