If you're making a custom pit, this may be useful to you.
The locking code is now:
Code: Select all
-- Set all bit flags but actuators
local pit_lock = 65534
dsb_lock_game(pit_lock)
dsb_delay_func(5, function()
local lev, xc, yc, face = dsb_party_coords()
dsb_unlock_game(pit_lock)
dsb_party_place(lev+1, xc, yc, face)
pit_damage(20)
end)
This version is less hackish (and much safer), because it doesn't rely on dsb_delay_func, except when the game has already been locked.
The reason actuators must stay unlocked is because otherwise objects lying on the same tile as the party when a pit opens underneath them wouldn't fall through-- the game would already be locked.