Prevent Child Entities
Hierarchy
-
Feature
↳
PreventChildEntities
Methods
preventChildEntities
▸ preventChildEntities(entity
): void
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
Name | Type |
---|---|
entity | Entity |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/PreventChildEntities.ts:54