int GetCurrentRoomIndex ( ) {: .copyable aria-label='Functions' }
???- note "Notes" This will always return the roomindex on the levelgrid, on which you entered the current room from. (see black entries in graphic below)
This function teleports you directly to the next stage without playing the leveltransition or updating the floors backdrop. Use other functions to fix those issues.
???- note "Notes" Whenever you update the visibility of a room on the minimap, it won't update the map automatically, since it is cached. You have to explicitly call UpdateVisibility() afterwards to apply any changes.
???- example "Example Code" This code
-- Local variables
local game = Game()
local level = game:GetLevel()
-- Give the player the Compass effect, which will display all of the floor's special rooms on the mini-map
level:ApplyCompassEffect()
-- Remove the icon for the Treasure Room specifically
local treasureIndex = level:QueryRoomTypeIndex(RoomType.ROOM_TREASURE, false, RNG())
local treasureRoom = level:GetRoomByIdx(treasureIndex)
treasureRoom.DisplayFlags = 0
-- Since the mini-map is cached, changing display flags won't update it unless we explicitly call this function
level:UpdateVisibility()
int DungeonReturnRoomIndex {: .copyable aria-label='Variables' }
EnterDoor {: aria-label='Variables' }
int EnterDoor {: .copyable aria-label='Variables' }
This value defines on which doorslot you entered the room.
???+ bug "Bugs" Changing this value has no impact on anything. the EnterDoor value is always determined by the LeaveDoor Value and the game itself.
GreedModeWave {: aria-label='Variables' }
int GreedModeWave {: .copyable aria-label='Variables' }
LeaveDoor {: aria-label='Variables' }
int LeaveDoor {: .copyable aria-label='Variables' }
This value defines on which doorslot you are positioned after the transition. You will always end up at the oposite side of the door specified. Example: LeaveDoor=1 (Up0) will position you at Doorslot Down0 (Logic: Doorslot+2)
???- note "Notes" if level.LeaveDoor is set to anything other than -1, the function will transition based on the room you are currently in.