Room Transition
Functions
Section titled “Functions”reloadRoom()
Section titled “reloadRoom()”reloadRoom():
void
Defined in: packages/isaacscript-common/src/functions/roomTransition.ts:16
Helper function to reload the current room using Game.StartRoomTransition.
This is useful for canceling the “goto” console command or to make the Level.SetStage method
take effect.
Returns
Section titled “Returns”void
teleport()
Section titled “teleport()”teleport(
roomGridIndex,direction?,roomTransitionAnim?):void
Defined in: packages/isaacscript-common/src/functions/roomTransition.ts:36
Helper function to change the current room. It can be used for both teleportation and “normal”
room transitions, depending on what is passed for the direction and roomTransitionAnim
arguments.
Use this function instead of invoking the Game.StartRoomTransition method directly so that:
- you do not forget to set the
Level.LeaveDoorfield - to prevent crashing on invalid room grid indexes
Note that if the current floor has Curse of the Maze, it may redirect the intended teleport.
Parameters
Section titled “Parameters”roomGridIndex
Section titled “roomGridIndex”int
The room grid index of the destination room.
direction?
Section titled “direction?”Direction = Direction.NO_DIRECTION
Optional. Default is Direction.NO_DIRECTION.
roomTransitionAnim?
Section titled “roomTransitionAnim?”RoomTransitionAnim = RoomTransitionAnim.TELEPORT
Optional. Default is RoomTransitionAnim.TELEPORT.
Returns
Section titled “Returns”void
