Grid Entities Specific
Functions
Section titled “Functions”getCrawlSpaces()
Section titled “getCrawlSpaces()”getCrawlSpaces(
crawlSpaceVariant?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:26
Helper function to get all of the grid entities of type GridEntityType.CRAWL_SPACE (18) in the
room.
Parameters
Section titled “Parameters”crawlSpaceVariant?
Section titled “crawlSpaceVariant?”-1 | CrawlSpaceVariant
Optional. If specified, will only get the crawl spaces that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntity[]
getPits()
Section titled “getPits()”getPits(
pitVariant?): readonlyGridEntityPit[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:45
Helper function to get all of the GridEntityPit in the room.
Parameters
Section titled “Parameters”pitVariant?
Section titled “pitVariant?”-1 | PitVariant
Optional. If specified, will only get the pits that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntityPit[]
getPoops()
Section titled “getPoops()”getPoops(
poopVariant?): readonlyGridEntityPoop[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:68
Helper function to get all of the GridEntityPoop in the room.
Parameters
Section titled “Parameters”poopVariant?
Section titled “poopVariant?”-1 | PoopGridEntityVariant
Optional. If specified, will only get the poops that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntityPoop[]
getPressurePlates()
Section titled “getPressurePlates()”getPressurePlates(
pressurePlateVariant?): readonlyGridEntityPressurePlate[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:91
Helper function to get all of the GridEntityPressurePlate in the room.
Parameters
Section titled “Parameters”pressurePlateVariant?
Section titled “pressurePlateVariant?”-1 | PressurePlateVariant
Optional. If specified, will only get the pressure plates that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntityPressurePlate[]
getRocks()
Section titled “getRocks()”getRocks(
variant?): readonlyGridEntityRock[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:119
Helper function to get all of the GridEntityRock in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only get the rocks that match the variant. Default is
-1, which matches every variant. Note that this is not the same thing as the
RockVariant enum, since that only applies to GridEntityType.ROCK, and other
types of grid entities can be the GridEntityRock class.
Returns
Section titled “Returns”readonly GridEntityRock[]
getSpikes()
Section titled “getSpikes()”getSpikes(
variant?): readonlyGridEntitySpikes[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:135
Helper function to get all of the GridEntitySpikes in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Returns
Section titled “Returns”readonly GridEntitySpikes[]
getTeleporters()
Section titled “getTeleporters()”getTeleporters(
variant?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:157
Helper function to get all of the grid entities of type GridEntityType.TELEPORTER (23) in the
room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only get the teleporters that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntity[]
getTNT()
Section titled “getTNT()”getTNT(
variant?): readonlyGridEntityTNT[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:166
Helper function to get all of the GridEntityTNT in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Returns
Section titled “Returns”readonly GridEntityTNT[]
getTrapdoors()
Section titled “getTrapdoors()”getTrapdoors(
trapdoorVariant?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:188
Helper function to get all of the grid entities of type GridEntityType.TRAPDOOR (17) in the
room. Specify a specific trapdoor variant to select only trapdoors of that variant.
Parameters
Section titled “Parameters”trapdoorVariant?
Section titled “trapdoorVariant?”-1 | TrapdoorVariant
Optional. If specified, will only get the trapdoors that match the variant. Default is -1, which matches every variant.
Returns
Section titled “Returns”readonly GridEntity[]
removeAllCrawlSpaces()
Section titled “removeAllCrawlSpaces()”removeAllCrawlSpaces(
crawlSpaceVariant?,updateRoom?,cap?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:209
Helper function to remove all of the GridEntityType.CRAWL_SPACE (18) in the room.
Parameters
Section titled “Parameters”crawlSpaceVariant?
Section titled “crawlSpaceVariant?”-1 | CrawlSpaceVariant
Optional. If specified, will only remove the crawl spaces that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the crawl spaces are removed.
Default is false. For more information, see the description of the
removeGridEntities helper function.
int
Optional. If specified, will only remove the given amount of crawl spaces.
Returns
Section titled “Returns”readonly GridEntity[]
The crawl spaces that were removed.
removeAllPits()
Section titled “removeAllPits()”removeAllPits(
pitVariant?,updateRoom?,cap?): readonlyGridEntityPit[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:232
Helper function to remove all of the GridEntityPit in the room.
Parameters
Section titled “Parameters”pitVariant?
Section titled “pitVariant?”-1 | PitVariant
Optional. If specified, will only remove the pits that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the pits are removed. Default is
false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of pits.
Returns
Section titled “Returns”readonly GridEntityPit[]
The pits that were removed.
removeAllPoops()
Section titled “removeAllPoops()”removeAllPoops(
poopVariant?,updateRoom?,cap?): readonlyGridEntityPoop[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:255
Helper function to remove all of the GridEntityPoop in the room.
Note that poops can either be an entity or a grid entity, depending on the situation. This function will only remove the grid entity poops.
Parameters
Section titled “Parameters”poopVariant?
Section titled “poopVariant?”-1 | PoopGridEntityVariant
Optional. If specified, will only remove the poops that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the poops are removed. Default is
false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of poops.
Returns
Section titled “Returns”readonly GridEntityPoop[]
The poops that were removed.
removeAllPressurePlates()
Section titled “removeAllPressurePlates()”removeAllPressurePlates(
pressurePlateVariant?,updateRoom?,cap?): readonlyGridEntityPressurePlate[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:275
Helper function to remove all of the GridEntityPressurePlate in the room.
Parameters
Section titled “Parameters”pressurePlateVariant?
Section titled “pressurePlateVariant?”-1 | PressurePlateVariant
Optional. If specified, will only remove the pressure plates that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the pressure plates are removed.
Default is false. For more information, see the description of the
removeGridEntities helper function.
int
Optional. If specified, will only remove the given amount of pressure plates.
Returns
Section titled “Returns”readonly GridEntityPressurePlate[]
The pressure plates that were removed.
removeAllRocks()
Section titled “removeAllRocks()”removeAllRocks(
variant?,updateRoom?,cap?): readonlyGridEntityRock[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:297
Helper function to remove all of the GridEntityRock in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only remove the rocks that match this variant.
Default is -1, which matches every variant. Note that this is not the same thing
as the RockVariant enum, since that only applies to GridEntityType.ROCK, and
other types of grid entities can be the GridEntityRock class.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the rocks are removed. Default is
false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of rocks.
Returns
Section titled “Returns”readonly GridEntityRock[]
The rocks that were removed.
removeAllSpikes()
Section titled “removeAllSpikes()”removeAllSpikes(
variant?,updateRoom?,cap?): readonlyGridEntitySpikes[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:317
Helper function to remove all of the GridEntitySpikes in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only remove the spikes that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the spikes are removed. Default is
false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of spikes.
Returns
Section titled “Returns”readonly GridEntitySpikes[]
The spikes that were removed.
removeAllTeleporters()
Section titled “removeAllTeleporters()”removeAllTeleporters(
variant?,updateRoom?,cap?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:337
Helper function to remove all of the GridEntityType.TELEPORTER (23) in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only remove the teleporters that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the teleporters are removed. Default
is false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of teleporters.
Returns
Section titled “Returns”readonly GridEntity[]
The teleporters that were removed.
removeAllTNT()
Section titled “removeAllTNT()”removeAllTNT(
variant?,updateRoom?,cap?): readonlyGridEntityTNT[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:357
Helper function to remove all of the GridEntityTNT in the room.
Parameters
Section titled “Parameters”variant?
Section titled “variant?”number = -1
Optional. If specified, will only remove the TNTs that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the TNTs are removed. Default is
false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of TNTs.
Returns
Section titled “Returns”readonly GridEntityTNT[]
The TNTs that were removed.
removeAllTrapdoors()
Section titled “removeAllTrapdoors()”removeAllTrapdoors(
trapdoorVariant?,updateRoom?,cap?): readonlyGridEntity[]
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:377
Helper function to remove all of the GridEntityType.TRAPDOOR (17) in the room.
Parameters
Section titled “Parameters”trapdoorVariant?
Section titled “trapdoorVariant?”-1 | TrapdoorVariant
Optional. If specified, will only remove the trapdoors that match this variant. Default is -1, which matches every variant.
updateRoom?
Section titled “updateRoom?”boolean = false
Optional. Whether to update the room after the trapdoors are removed. Default
is false. For more information, see the description of the removeGridEntities
helper function.
int
Optional. If specified, will only remove the given amount of trapdoors.
Returns
Section titled “Returns”readonly GridEntity[]
The trapdoors that were removed.
spawnCrawlSpace()
Section titled “spawnCrawlSpace()”spawnCrawlSpace(
gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:387
Helper function to spawn a GridEntityType.CRAWL_SPACE (18).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
spawnCrawlSpaceWithVariant()
Section titled “spawnCrawlSpaceWithVariant()”spawnCrawlSpaceWithVariant(
crawlSpaceVariant,gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:397
Helper function to spawn a GridEntityType.CRAWL_SPACE (18) with a specific variant.
Parameters
Section titled “Parameters”crawlSpaceVariant
Section titled “crawlSpaceVariant”CrawlSpaceVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
spawnDoor()
Section titled “spawnDoor()”spawnDoor(
gridIndexOrPosition):GridEntityDoor|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:409
Helper function to spawn a GridEntityType.PIT (7) with a specific variant.
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityDoor | undefined
spawnDoorWithVariant()
Section titled “spawnDoorWithVariant()”spawnDoorWithVariant(
doorVariant,gridIndexOrPosition):GridEntityDoor|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:416
Helper function to spawn a GridEntityType.DOOR (16).
Parameters
Section titled “Parameters”doorVariant
Section titled “doorVariant”DoorVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityDoor | undefined
spawnPit()
Section titled “spawnPit()”spawnPit(
gridIndexOrPosition):GridEntityPit|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:436
Helper function to spawn a GridEntityType.DOOR (16) with a specific variant.
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPit | undefined
spawnPitWithVariant()
Section titled “spawnPitWithVariant()”spawnPitWithVariant(
pitVariant,gridIndexOrPosition):GridEntityPit|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:443
Helper function to spawn a GridEntityType.PIT (7) with a specific variant.
Parameters
Section titled “Parameters”pitVariant
Section titled “pitVariant”PitVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPit | undefined
spawnPoop()
Section titled “spawnPoop()”spawnPoop(
gridIndexOrPosition):GridEntityPoop|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:463
Helper function to spawn a GridEntityType.POOP (14).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPoop | undefined
spawnPoopWithVariant()
Section titled “spawnPoopWithVariant()”spawnPoopWithVariant(
poopVariant,gridIndexOrPosition):GridEntityPoop|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:473
Helper function to spawn a GridEntityType.POOP (14) with a specific variant.
Parameters
Section titled “Parameters”poopVariant
Section titled “poopVariant”PoopGridEntityVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPoop | undefined
spawnPressurePlate()
Section titled “spawnPressurePlate()”spawnPressurePlate(
gridIndexOrPosition):GridEntityPressurePlate|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:493
Helper function to spawn a GridEntityType.PRESSURE_PLATE (20).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPressurePlate | undefined
spawnPressurePlateWithVariant()
Section titled “spawnPressurePlateWithVariant()”spawnPressurePlateWithVariant(
pressurePlateVariant,gridIndexOrPosition):GridEntityPressurePlate|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:503
Helper function to spawn a GridEntityType.PRESSURE_PLATE (20) with a specific variant.
Parameters
Section titled “Parameters”pressurePlateVariant
Section titled “pressurePlateVariant”PressurePlateVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityPressurePlate | undefined
spawnRock()
Section titled “spawnRock()”spawnRock(
gridIndexOrPosition):GridEntityRock|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:523
Helper function to spawn a GridEntityType.ROCK (2).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityRock | undefined
spawnRockWithVariant()
Section titled “spawnRockWithVariant()”spawnRockWithVariant(
rockVariant,gridIndexOrPosition):GridEntityRock|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:530
Helper function to spawn a GridEntityType.ROCK (2) with a specific variant.
Parameters
Section titled “Parameters”rockVariant
Section titled “rockVariant”RockVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityRock | undefined
spawnSpikes()
Section titled “spawnSpikes()”spawnSpikes(
gridIndexOrPosition):GridEntitySpikes|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:550
Helper function to spawn a GridEntityType.SPIKES (8).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntitySpikes | undefined
spawnSpikesWithVariant()
Section titled “spawnSpikesWithVariant()”spawnSpikesWithVariant(
variant,gridIndexOrPosition):GridEntitySpikes|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:557
Helper function to spawn a GridEntityType.SPIKES (8) with a specific variant.
Parameters
Section titled “Parameters”variant
Section titled “variant”int
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntitySpikes | undefined
spawnTeleporter()
Section titled “spawnTeleporter()”spawnTeleporter(
gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:577
Helper function to spawn a GridEntityType.TELEPORTER (23).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
spawnTeleporterWithVariant()
Section titled “spawnTeleporterWithVariant()”spawnTeleporterWithVariant(
variant,gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:584
Helper function to spawn a GridEntityType.TELEPORTER (23) with a specific variant.
Parameters
Section titled “Parameters”variant
Section titled “variant”int
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
spawnTNT()
Section titled “spawnTNT()”spawnTNT(
gridIndexOrPosition):GridEntityTNT|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:596
Helper function to spawn a GridEntityType.TNT (12).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityTNT | undefined
spawnTNTWithVariant()
Section titled “spawnTNTWithVariant()”spawnTNTWithVariant(
variant,gridIndexOrPosition):GridEntityTNT|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:603
Helper function to spawn a GridEntityType.TNT (12) with a specific variant.
Parameters
Section titled “Parameters”variant
Section titled “variant”int
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntityTNT | undefined
spawnTrapdoor()
Section titled “spawnTrapdoor()”spawnTrapdoor(
gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:623
Helper function to spawn a GridEntityType.TRAPDOOR (17).
Parameters
Section titled “Parameters”gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
spawnTrapdoorWithVariant()
Section titled “spawnTrapdoorWithVariant()”spawnTrapdoorWithVariant(
trapdoorVariant,gridIndexOrPosition):GridEntity|undefined
Defined in: packages/isaacscript-common/src/functions/gridEntitiesSpecific.ts:633
Helper function to spawn a GridEntityType.TRAPDOOR (17) with a specific variant.
Parameters
Section titled “Parameters”trapdoorVariant
Section titled “trapdoorVariant”TrapdoorVariant
gridIndexOrPosition
Section titled “gridIndexOrPosition”int | Vector
Returns
Section titled “Returns”GridEntity | undefined
