Skip to content

Entities Specific

getBombs(bombVariant?, subType?): readonly EntityBomb[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:35

Helper function to get all of the bombs in the room. (Specifically, this refers to the EntityBomb class, not bomb pickups.)

For example:

// Make all of the bombs in the room invisible.
for (const bomb of getBombs()) {
bomb.Visible = false;
}

-1 | BombVariant

Optional. If specified, will only get the bombs that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the bombs that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityBomb[]


getEffects(effectVariant?, subType?): readonly EntityEffect[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:69

Helper function to get all of the effects in the room.

For example:

// Make all of the effects in the room invisible.
for (const effect of getEffects()) {
effect.Visible = false;
}

-1 | EffectVariant

Optional. If specified, will only get the effects that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the effects that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityEffect[]


getFamiliars(familiarVariant?, subType?): readonly EntityFamiliar[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:103

Helper function to get all of the familiars in the room.

For example:

// Make all of the familiars in the room invisible.
for (const familiar of getFamiliars()) {
familiar.Visible = false;
}

-1 | FamiliarVariant

Optional. If specified, will only get the familiars that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the familiars that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityFamiliar[]


getKnives(knifeVariant?, subType?): readonly EntityKnife[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:137

Helper function to get all of the knives in the room.

For example:

// Make all of the knives in the room invisible.
for (const knife of getKnives()) {
knife.Visible = false;
}

-1 | KnifeVariant

Optional. If specified, will only get the knives that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the knives that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityKnife[]


getLasers(laserVariant?, subType?): readonly EntityLaser[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:171

Helper function to get all of the lasers in the room.

For example:

// Make all of the lasers in the room invisible.
for (const laser of getLasers()) {
laser.Visible = false;
}

-1 | LaserVariant

Optional. If specified, will only get the lasers that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the lasers that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityLaser[]


getNPCs(entityType?, variant?, subType?, ignoreFriendly?): readonly EntityNPC[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:201

Helper function to get all of the NPCs in the room.

-1 | EntityType

Optional. If specified, will only get the NPCs that match the type. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the NPCs that match the variant. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the bombs that match the sub-type. Default is -1, which matches every sub-type.

boolean = false

Optional. If set to true, it will exclude friendly NPCs from being returned. Default is false. Will only be taken into account if the entityType is specified.

readonly EntityNPC[]


getPickups(pickupVariant?, subType?): readonly EntityPickup[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:237

Helper function to get all of the pickups in the room.

For example:

// Make all of the pickups in the room invisible.
for (const pickup of getPickups()) {
pickup.Visible = false;
}

-1 | PickupVariant

Optional. If specified, will only get the pickups that match the variant. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the pickups that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityPickup[]


getProjectiles(projectileVariant?, subType?): readonly EntityProjectile[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:271

Helper function to get all of the projectiles in the room.

For example:

// Make all of the projectiles in the room invisible.
for (const projectile of getProjectiles()) {
projectile.Visible = false;
}

-1 | ProjectileVariant

Optional. If specified, will only get the projectiles that match the variant. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the projectiles that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityProjectile[]


getSlots(slotVariant?, subType?): readonly EntitySlot[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:309

Helper function to get all of the slots in the room.

For example:

// Make all of the slots in the room invisible.
for (const slot of getSlots()) {
slot.Visible = false;
}

-1 | SlotVariant

Optional. If specified, will only get the slots that match the variant. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the slots that match the sub-type. Default is -1, which matches every sub-type.

readonly EntitySlot[]


getTears(tearVariant?, subType?): readonly EntityTear[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:335

Helper function to get all of the tears in the room.

For example:

// Make all of the tears in the room invisible.
for (const tear of getTears()) {
tear.Visible = false;
}

-1 | TearVariant

Optional. If specified, will only get the tears that match the variant. Default is -1, which matches every entity type.

number = -1

Optional. If specified, will only get the tears that match the sub-type. Default is -1, which matches every sub-type.

readonly EntityTear[]


removeAllBombs(bombVariant?, subType?, cap?): readonly EntityBomb[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:363

Helper function to remove all of the bombs in the room. (Specifically, this refers to the EntityBomb class, not bomb pickups.)

-1 | BombVariant

Optional. If specified, will only remove the bombs that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the bombs that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of bombs.

readonly EntityBomb[]

An array of the bombs that were removed.


removeAllEffects(effectVariant?, subType?, cap?): readonly EntityEffect[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:382

Helper function to remove all of the effects in the room.

-1 | EffectVariant

Optional. If specified, will only remove the effects that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the effects that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of effects.

readonly EntityEffect[]

An array of the effects that were removed.


removeAllFamiliars(familiarVariant?, subType?, cap?): readonly EntityFamiliar[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:401

Helper function to remove all of the familiars in the room.

-1 | FamiliarVariant

Optional. If specified, will only remove the familiars that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the familiars that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of familiars.

readonly EntityFamiliar[]

An array of the familiars that were removed.


removeAllKnives(knifeVariant?, subType?, cap?): readonly EntityKnife[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:420

Helper function to remove all of the knives in the room.

-1 | KnifeVariant

Optional. If specified, will only remove the knives that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the knives that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of knives.

readonly EntityKnife[]

An array of the knives that were removed.


removeAllLasers(laserVariant?, subType?, cap?): readonly EntityLaser[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:439

Helper function to remove all of the lasers in the room.

-1 | LaserVariant

Optional. If specified, will only remove the lasers that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the lasers that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of lasers.

readonly EntityLaser[]

An array of the lasers that were removed.


removeAllNPCs(entityType?, variant?, subType?, cap?): readonly EntityNPC[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:460

Helper function to remove all of the NPCs in the room.

-1 | EntityType

Optional. If specified, will only remove the NPCs that match the type. Default is -1, which matches every type.

number = -1

Optional. If specified, will only remove the NPCs that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove the NPCs that match the sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of NPCs.

readonly EntityNPC[]

An array of the NPCs that were removed.


removeAllPickups(pickupVariant?, subType?, cap?): readonly EntityPickup[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:480

Helper function to remove all of the pickups in the room.

-1 | PickupVariant

Optional. If specified, will only remove pickups that match this variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove pickups that match this sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of pickups.

readonly EntityPickup[]

An array of the pickups that were removed.


removeAllProjectiles(projectileVariant?, subType?, cap?): readonly EntityProjectile[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:499

Helper function to remove all of the projectiles in the room.

-1 | ProjectileVariant

Optional. If specified, will only remove projectiles that match this variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove projectiles that match this sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of projectiles.

readonly EntityProjectile[]

An array of the projectiles that were removed.


removeAllSlots(slotVariant?, subType?, cap?): readonly Entity[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:518

Helper function to remove all of the slots in the room.

-1 | SlotVariant

Optional. If specified, will only remove slots that match this variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove slots that match this sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of slots.

readonly Entity[]

An array of the slots that were removed.


removeAllTears(tearVariant?, subType?, cap?): readonly EntityTear[]

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:537

Helper function to remove all of the tears in the room.

-1 | TearVariant

Optional. If specified, will only remove tears that match this variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only remove tears that match this sub-type. Default is -1, which matches every sub-type.

int

Optional. If specified, will only remove the given amount of tears.

readonly EntityTear[]

An array of the tears that were removed.


spawnBomb(bombVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityBomb

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:547

Helper function to spawn a EntityType.BOMB (4).

BombVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityBomb


spawnBombWithSeed(bombVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityBomb

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:572

Helper function to spawn a EntityType.BOMB (4) with a specific seed.

BombVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityBomb


spawnEffect(effectVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityEffect

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:591

Helper function to spawn a EntityType.EFFECT (1000).

EffectVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityEffect


spawnEffectWithSeed(effectVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityEffect

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:616

Helper function to spawn a EntityType.EFFECT (1000) with a specific seed.

EffectVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityEffect


spawnFamiliar(familiarVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityFamiliar

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:640

Helper function to spawn a EntityType.FAMILIAR (3).

If you are trying to implement a custom familiar, you probably want to use the checkFamiliarFromCollectibles helper function instead.

FamiliarVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityFamiliar


spawnFamiliarWithSeed(familiarVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityFamiliar

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:665

Helper function to spawn a EntityType.FAMILIAR (3) with a specific seed.

FamiliarVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityFamiliar


spawnKnife(knifeVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityKnife

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:684

Helper function to spawn a EntityType.KNIFE (8).

KnifeVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityKnife


spawnKnifeWithSeed(knifeVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityKnife

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:709

Helper function to spawn a EntityType.KNIFE (8) with a specific seed.

KnifeVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityKnife


spawnLaser(laserVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityLaser

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:728

Helper function to spawn a EntityType.LASER (7).

LaserVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityLaser


spawnLaserWithSeed(laserVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityLaser

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:753

Helper function to spawn a EntityType.LASER (7) with a specific seed.

LaserVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityLaser


spawnNPC(entityType, variant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityNPC

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:777

Helper function to spawn an NPC.

Note that if you pass a non-NPC EntityType to this function, it will cause a run-time error, since the Entity.ToNPC method will return undefined.

EntityType

int

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityNPC


spawnNPCWithSeed(entityType, variant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityNPC

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:808

Helper function to spawn an NPC with a specific seed.

Note that if you pass a non-NPC EntityType to this function, it will cause a run-time error, since the Entity.ToNPC method will return undefined.

EntityType

int

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityNPC


spawnPickup(pickupVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityPickup

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:829

Helper function to spawn a EntityType.PICKUP (5).

PickupVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityPickup


spawnPickupWithSeed(pickupVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityPickup

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:854

Helper function to spawn a EntityType.PICKUP (5) with a specific seed.

PickupVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityPickup


spawnProjectile(projectileVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityProjectile

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:873

Helper function to spawn a EntityType.PROJECTILE (9).

ProjectileVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityProjectile


spawnProjectileWithSeed(projectileVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityProjectile

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:898

Helper function to spawn a EntityType.PROJECTILE (9) with a specific seed.

ProjectileVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityProjectile


spawnSlot(slotVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntitySlot

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:917

Helper function to spawn a EntityType.SLOT (6).

SlotVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntitySlot


spawnSlotWithSeed(slotVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntitySlot

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:937

Helper function to spawn a EntityType.SLOT (6) with a specific seed.

SlotVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntitySlot


spawnTear(tearVariant, subType, positionOrGridIndex, velocity?, spawner?, seedOrRNG?): EntityTear

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:956

Helper function to spawn a EntityType.TEAR (2).

TearVariant

int

int | Vector

Vector = VectorZero

Entity

RNG | Seed

EntityTear


spawnTearWithSeed(tearVariant, subType, positionOrGridIndex, seedOrRNG, velocity?, spawner?): EntityTear

Defined in: packages/isaacscript-common/src/functions/entitiesSpecific.ts:981

Helper function to spawn a EntityType.EntityType (2) with a specific seed.

TearVariant

int

int | Vector

RNG | Seed

Vector = VectorZero

Entity

EntityTear