Skip to content

Class "EntityNPC"⚓︎

Class Diagram⚓︎

    classDiagram
    class Entity:::diagramCurrentPage
    class EntityBomb
    class EntityEffect
    class EntityFamiliar
    class EntityKnife
    class EntityLaser
    class EntityNPC
    class EntityPickup
    class EntityPlayer
    class EntityProjectile
    class EntitySlot
    class EntityTear
    Entity <|-- EntityBomb
    Entity <|-- EntityEffect
    Entity <|-- EntityFamiliar
    Entity <|-- EntityKnife
    Entity <|-- EntityLaser
    Entity <|-- EntityNPC
    Entity <|-- EntityPickup
    Entity <|-- EntityPlayer
    Entity <|-- EntityProjectile
    Entity <|-- EntitySlot
    Entity <|-- EntityTear
    link Entity "https://wofsauge.github.io/IsaacDocs/rep/Entity.html" "Go to page for 'Entity' class"
    link EntityBomb "https://wofsauge.github.io/IsaacDocs/rep/EntityBomb.html" "Go to page for 'EntityBomb' class"
    link EntityEffect "https://wofsauge.github.io/IsaacDocs/rep/EntityEffect.html" "Go to page for 'EntityEffect' class"
    link EntityFamiliar "https://wofsauge.github.io/IsaacDocs/rep/EntityFamiliar.html" "Go to page for 'EntityFamiliar' class"
    link EntityKnife "https://wofsauge.github.io/IsaacDocs/rep/EntityKnife.html" "Go to page for 'EntityKnife' class"
    link EntityLaser "EntityLaser.html" "Go to page for 'EntityLaser' class"
    link EntityNPC "EntityNPC.html" "Go to page for 'EntityNPC' class"
    link EntityPickup "EntityPickup.html" "Go to page for 'EntityPickup' class"
    link EntityPlayer "EntityPlayer.html" "Go to page for 'EntityPlayer' class"
    link EntityProjectile "https://wofsauge.github.io/IsaacDocs/rep/EntityProjectile.html" "Go to page for 'EntityProjectile' class"
    link EntitySlot "EntitySlot.html" "Go to page for 'EntitySlot' class"
    link EntityTear "https://wofsauge.github.io/IsaacDocs/rep/EntityTear.html" "Go to page for 'EntityTear' class"

Modified Functions⚓︎

PlaySound ()⚓︎

void PlaySound ( int ID, float Volume = 1.0, int FrameDelay = 2, boolean Loop = true, float Pitch = 1.0 )⚓︎

All arguments besides ID are now optional.


Functions⚓︎

ClearFlyingOverride ()⚓︎

void ClearFlyingOverride ( )⚓︎

Removes any value set by SetFlyingOverride


FireBossProjectilesEx ()⚓︎

EntityProjectile[] FireBossProjectilesEx ( int NumProjectiles, Vector TargetPos, float TrajectoryModifier, ProjectileParams Params )⚓︎

Same as FireBossProjectiles, but returns a table containing the list of spawned projectiles.


FireGridEntity ()⚓︎

EntityProjectile FireGridEntity ( Sprite GridEntitySprite, GridEntityDesc GridEntityDesc, Vector Velocity, BackdropType Backdrop = BackdropType.BASEMENT )⚓︎


FireProjectilesEx ()⚓︎

EntityProjectile[] FireProjectilesEx (Vector Position, Vector Velocity, ProjectilesMode Mode, ProjectileParams Params)⚓︎

Same as FireProjectiles, but returns a table containing the list of spawned projectiles.


GetBossColorIdx ()⚓︎

int GetBossColorIdx ( )⚓︎

Returns the returns the bosscoloridx(which is usually just the subtype) or -1 if its not a bosscolor (or bosscolor doesnt apply).


GetControllerId ()⚓︎

int GetControllerId ( )⚓︎

Returns the ControllerId for the NPC, which indicates which player is controlling it. Will return -1 when not being controlled by any player.


GetDarkRedChampionRegenTimer ()⚓︎

int GetDarkRedChampionRegenTimer ( )⚓︎


GetDirtColor ()⚓︎

Color GetDirtColor ( )⚓︎

Returns the dynamic dirt color of the entity. This lets entities like Nightcrawler blend in to the environment.


GetFireplaceLoot ()⚓︎

LootList GetFireplaceLoot ( )⚓︎

Returns the unique LootList used by Fireplaces.


GetHitList ()⚓︎

int[] GetHitList ( )⚓︎


GetShieldStrength ()⚓︎

float GetShieldStrength ( )⚓︎


GetShopkeeperLoot ()⚓︎

LootList GetShopkeeperLoot ( )⚓︎

Returns the unique LootList used by Shopkeepers.


GetSirenPlayerEntity ()⚓︎

EntityPlayer GetSirenPlayerEntity ( )⚓︎


IsBossColor ()⚓︎

boolean IsBossColor ( )⚓︎


ReplaceSpritesheet ()⚓︎

void ReplaceSpritesheet ( int LayerId, string PngFilename, bool LoadGraphics = false )⚓︎

Similar to Sprite.ReplaceSpritesheet(). Appends "_champion"/stage suffix to PngFilename if possible.


SetControllerId ()⚓︎

int SetControllerId ( int ControllerId )⚓︎

Sets the ControllerId for the NPC, which indicates which player will control it. Set it to -1 for no player controls (back to normal behaviour).


SetFlyingOverride ()⚓︎

void SetFlyingOverride ( boolean CanFly )⚓︎

Sets an override to the return value of IsFlying, which is normally based on EntityGridCollisionClass. Can be used to make grounded enemies ignore creep, or flying enemies get hit by creep.


SetShieldStrength ()⚓︎

void SetShieldStrength ( float Strength )⚓︎


ShootMaggotProjectile ()⚓︎

static const EntityNPC ShootMaggotProjectile ( Vector Position, Vector Target, float FallingSpeed = -8.0, float YOffset = -24.0 )⚓︎


SpawnBloodCloud ()⚓︎

EntityEffect SpawnBloodCloud ( Vector Position, Color Color )⚓︎


SpawnBloodSplash ()⚓︎

void SpawnBloodSplash ( )⚓︎


ThrowLeech ()⚓︎

static const EntityNPC ThrowLeech ( Vector Position, Entity Source, Vector Target, float YPosOffset = -10.0, boolean Big = false )⚓︎


ThrowMaggot ()⚓︎

static const EntityNPC ThrowMaggot ( Vector Origin, Vector Velocity, float YOffset = -10.0, float FallSpeed = -8.0 )⚓︎


ThrowMaggotAtPos ()⚓︎

static const EntityNPC ThrowMaggotAtPos ( Vector Origin, Vector Target, float YOffset = -8.0 )⚓︎


ThrowRockSpider ()⚓︎

static const EntityNPC ThrowRockSpider ( Vector Position, Entity Source, Vector Velocity, int Variant = 0, float YPosOffset = -10.0 )⚓︎


ThrowStrider ()⚓︎

static const EntityNPC ThrowStrider ( Vector Position, Entity Source, Vector Target )⚓︎


TryForceTarget ()⚓︎

boolean TryForceTarget ( Entity Target, int Duration )⚓︎

Used by Lost Fly to force this NPC to focus on a specific target.


TrySplit ()⚓︎

boolean TrySplit ( float DefaultDamage, EntityRef Source, boolean DoScreenEffects = true )⚓︎

Will attempt to split the enemy in two like the Meat Cleaver collectible. Returns false if the enemy dies from the damage before they split, true otherwise.


TryThrow ()⚓︎

boolean TryThrow ( EntityRef Source, Vector Direction, float Force )⚓︎

Info

Force only applies to NPC poop (it's modified and then used as V1.y, with V1.x being -20.0) and may be incorrect. This needs further investigation.


UpdateDirtColor ()⚓︎

void UpdateDirtColor ( boolean Immediate )⚓︎

Instructs the entity to update its dirt color. This is generally done automatically on vanilla entities, but up until now, modded ones have been quite limited in this regard.

If Immediate is set, the dirt color will be set to exactly what is beneath the entity. Otherwise, it will be updated smoothly over the course of multiple frames.


Variables⚓︎

V1⚓︎

Vector V1⚓︎

Fix of original function that now correctly returns a pointer to the Vector.


V2⚓︎

Vector V2⚓︎

Fix of original function that now correctly returns a pointer to the Vector.