Skip to content

Prevent Child Entities

Defined in: packages/isaacscript-common/src/classes/features/other/PreventChildEntities.ts:11

  • Feature

preventChildEntities(entity): void

Defined in: packages/isaacscript-common/src/classes/features/other/PreventChildEntities.ts:54

Helper function to prevent an entity from spawning any other entities. Meant to be used on NPCs like Squirts. This behavior will only last for the current room.

Under the hood, this function will remove any new NPCs spawned that have a Entity.SpawnerEntity or Entity.Parent value that matches the provided entity. (They are removed during the POST_NPC_INIT callback specifically.)

In order to use this function, you must upgrade your mod with ISCFeature.PREVENT_CHILD_ENTITIES.

Entity

void