Hi everyone,
I'm making a mod that spawns the secret exit door in the mirror world. I was able to spawn the secret door to Mines using TrySpawnSecretExit(), but I encountered an issue: when I leave the room and then enter it again, the door disappears.
function clearedRoom()
local
room = game:GetRoom()
local
RoomType = room:GetType()
-- This part is to keep the secret room door from disappearing
if room:IsMirrorWorld() and RoomType == 5 and room:IsClear() then
local
success = room:TrySpawnSecretExit(false, true)
end
end
mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, clearedRoom)
T
