Prevent Child Entities
Classes
Section titled “Classes”PreventChildEntities
Section titled “PreventChildEntities”Defined in: packages/isaacscript-common/src/classes/features/other/PreventChildEntities.ts:11
Extends
Section titled “Extends”Feature
Methods
Section titled “Methods”preventChildEntities()
Section titled “preventChildEntities()”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.
Parameters
Section titled “Parameters”entity
Section titled “entity”Entity
Returns
Section titled “Returns”void
