Afterbirth+ Documentation
  • README
  • beta
    • docs
      • Class "RoomConfig::Entry"
      • Class "ItemConfig::Card"
      • Class "PlayerTypes::PosVel"
      • enums
        • Enum "DoorVariant"
        • CollectibleType
        • Enum "ActionTriggers"
        • Enum "Card"
        • Enum "NpcState"
        • Enum "EffectVariant"
        • Enum "EntityGridCollisionClass"
        • Enum "EntityFlag"
        • Enum "LocustSubtypes"
        • Enum "LevelCurse"
        • Enum "GridRooms"
        • Enum "TrinketType"
        • Enum "SortingLayer"
        • Enum "ItemType"
        • Enum "GridCollisionClass"
        • Enum "ModCallbacks"
        • Enum "DoorSlot"
        • Enum "CacheFlag"
        • Enum "PillEffect"
        • Enum "EntityCollisionClass"
        • Enum "ItemPoolType"
        • Enum "PickupPrice"
        • Enum "InputHook"
        • Enum "ButtonAction"
        • Enum "PlayerSpriteLayer"
        • Enum "Keyboard"
        • Enum "GameStateFlag"
        • Enum "PillColor"
        • Enum "CoinSubType"
        • Enum "PlayerForm"
        • Enum "PickupVariant"
        • Enum "GridEntityType"
        • Enum "EntityPartition"
        • Enum "SeedEffect"
        • Enum "RoomShape"
        • Enum "Mouse"
        • Enum "TearFlags"
        • Enum "Music"
        • Enum "BabySubType"
        • Enum "BombVariant"
        • Enum "DoorState"
        • Enum "Challenge"
        • Enum "TearVariant"
        • Enum "EntityType"
        • Enum "SoundEffect"
        • Enum "FamiliarVariant"
        • Enum "PlayerType"
        • Enum "Difficulty"
        • Enum "DamageFlag"
        • Enum "Direction"
        • Enum "KeySubType"
        • Enum "LaserOffset"
        • Enum "ProjectileFlags"
        • Enum "LevelStage"
        • Enum "PlayerItemState"
        • Enum "LevelStateFlag"
        • Enum "ChestSubType"
        • Enum "ProjectileVariant"
        • Enum "WeaponType"
        • Enum "RoomType"
        • Enum "NullItemID"
        • Enum "StageType"
        • Enum "HeartSubType"
        • Enum "BombSubType"
      • Class "Isaac"
      • Class "ProjectileParams"
      • Class "Font"
      • Class "ItemPool"
      • Class "GridEntityRock"
      • tutorials
        • Class "[Tutorial]Rendertext"
        • Tutorial: Example Project
        • Class "XMLFiledocumentation"
        • Class "Writingscreenshaders"
        • Class "DebugConsole"
        • [Tutorial] Adding Costumes to items without LUA
        • Class "Usingadditional.luaFiles"
        • [Tutorial] Debugging with ZeroBrane Studio
      • Class "CppContainer::Vector::ItemConfigList"
      • Class "EntityProjectile"
      • Class "CppContainer::ArrayProxy"
      • Class "CppContainer::Vector::CardConfigList"
      • Class "PathFinder"
      • Class "ItemConfig::PillEffect"
      • Class "CppContainer::Vector::EffectList"
      • Class "RoomDescriptor"
      • Class "GridEntity"
      • Class "GridEntityPoop"
      • PLACEHOLDER
      • Class "TearParams"
      • Class "GridEntityPit"
      • Class "EntityFamiliar"
      • Class "MusicManager"
      • Class "SFXManager"
      • Lua API Documentation for The Binding of Isaac - Afterbirth+
      • Class "GridEntityTNT"
      • Class "EntityRef"
      • Class "Sprite"
      • Class "EntityBomb"
      • Class "EntityTear"
      • Class "QueueItemData"
      • Class "EntityPlayer"
      • Class "Vector"
      • Class "Entity"
      • Class "ItemConfig::Config"
      • Class "CppContainer::ArrayProxy::RoomList"
      • Class "RNG"
      • Class "EntityPtr"
      • Class "Input"
      • Class "EntityPickup"
      • Class "EntityLaser"
      • Class "GridEntityPressurePlate"
      • Class "CppContainer::Vector::VectorList"
      • Class "Room"
      • Class "CppContainer::Vector::CostumeConfigList"
      • Class "GridEntityDesc"
      • Class "Level"
      • Class "RoomConfig::Spawn"
      • Class "Color"
      • Class "KColor"
      • Class "TemporaryEffect"
      • Class "EntityKnife"
      • Class "Seeds"
      • Class "CppContainer::EntityList"
      • Class "GridEntityDoor"
      • Class "ShockwaveParams"
      • Class "ItemConfig::Costume"
      • Class "GridEntitySpikes"
      • Class "EntityEffect"
      • Class "CppContainer::Vector::PillConfigList"
      • Class "EntityNPC"
      • Class "RoomDescriptorData"
      • Class "ItemConfig::Item"
      • Class "RoomConfig::Room"
      • Class "Game"
      • Class "TemporaryEffects"
      • Class "PlayerTypes::ActiveItemDesc"
      • Class "Global Functions"
Powered by GitBook
On this page
  • Functions
  • AnimWalkFrame () {: aria-label='Functions' }
  • CalcTargetPosition () {: aria-label='Functions' }
  • CanBeDamagedFromVelocity () {: aria-label='Functions' }
  • CanReroll () {: aria-label='Functions' }
  • FireBossProjectiles () {: aria-label='Functions' }
  • FireProjectiles () {: aria-label='Functions' }
  • GetAliveEnemyCount () {: aria-label='Functions' }
  • GetBossColorIdx () {: aria-label='Functions' }
  • GetChampionColorIdx () {: aria-label='Functions' }
  • GetPlayerTarget () {: aria-label='Functions' }
  • IsBoss () {: aria-label='Functions' }
  • IsChampion () {: aria-label='Functions' }
  • KillUnique () {: aria-label='Functions' }
  • MakeChampion () {: aria-label='Functions' }
  • MakeSplat () {: aria-label='Functions' }
  • Morph () {: aria-label='Functions' }
  • PlaySound () {: aria-label='Functions' }
  • QueryNPCsGroup () {: aria-label='Functions' }
  • QueryNPCsSpawnerType () {: aria-label='Functions' }
  • QueryNPCsType () {: aria-label='Functions' }
  • ResetPathFinderTarget () {: aria-label='Functions' }
  • ThrowSpider () {: aria-label='Functions' }
  • Variables
  • CanShutDoors {: aria-label='Variables' }
  • ChildNPC {: aria-label='Variables' }
  • EntityRef {: aria-label='Variables' }
  • GroupIdx {: aria-label='Variables' }
  • I1 {: aria-label='Variables' }
  • I2 {: aria-label='Variables' }
  • ParentNPC {: aria-label='Variables' }
  • Pathfinder {: aria-label='Variables' }
  • ProjectileCooldown {: aria-label='Variables' }
  • ProjectileDelay {: aria-label='Variables' }
  • Scale {: aria-label='Variables' }
  • State {: aria-label='Variables' }
  • StateFrame {: aria-label='Variables' }
  • V1 {: aria-label='Variables' }
  • V2 {: aria-label='Variables' }

Was this helpful?

  1. beta
  2. docs

Class "EntityNPC"

PreviousClass "CppContainer::Vector::PillConfigList"NextClass "RoomDescriptorData"

Last updated 4 years ago

Was this helpful?

Functions

AnimWalkFrame () {: aria-label='Functions' }

{: .abp .tooltip .badge }

void AnimWalkFrame ( string HorizontalAnim, string VerticalAnim, float SpeedThreshold ) {: .copyable aria-label='Functions' }

CalcTargetPosition () {: aria-label='Functions' }

{: .abp .tooltip .badge }

CalcTargetPosition ( float DistanceLimit ) {: .copyable aria-label='Functions' }

CanBeDamagedFromVelocity () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean CanBeDamagedFromVelocity ( Velocity ) {: .copyable aria-label='Functions' }

CanReroll () {: aria-label='Functions' }

{: .abp .tooltip .badge }

boolean CanReroll ( ) {: .copyable aria-label='Functions' }

FireBossProjectiles () {: aria-label='Functions' }

fire a number of projectiles, optionally targeting the player direction is randomized, or slightly randomized when targeting the player FallingAccelModifier can be used to make projectiles fall faster to the ground returns a pointer to the projectile spawned last (useful e.g. when NumProjectiles=1)

FireProjectiles () {: aria-label='Functions' }

GetAliveEnemyCount () {: aria-label='Functions' }

int GetAliveEnemyCount ( ) {: .copyable aria-label='Functions' }

Used to redirect close door enemies to any enemies for friendly npcs.

GetBossColorIdx () {: aria-label='Functions' }

int GetBossColorIdx ( ) {: .copyable aria-label='Functions' }

???- note "Notes" This will return the boss color idx reduced by 1. To get the actual color as set in bosscolors.xml, add +1 to the result.

GetChampionColorIdx () {: aria-label='Functions' }

int GetChampionColorIdx ( ) {: .copyable aria-label='Functions' }

???- note "Notes" A list of Champion colors can be found here : ChampionColorIdx

GetPlayerTarget () {: aria-label='Functions' }

if there are no modifiers (best friend) this will return the player

IsBoss () {: aria-label='Functions' }

boolean IsBoss ( ) {: .copyable aria-label='Functions' }

IsChampion () {: aria-label='Functions' }

boolean IsChampion ( ) {: .copyable aria-label='Functions' }

KillUnique () {: aria-label='Functions' }

void KillUnique ( ) {: .copyable aria-label='Functions' }

For entities with unique death animation, like Flush! vs poop enemies.

MakeChampion () {: aria-label='Functions' }

void MakeChampion ( int Seed ) {: .copyable aria-label='Functions' }

Forces a non champion to become a champion, resets hp to max hp.

???- note "Notes" Hard to use because there are millions of possible seeds to input here.Use Morph() to change the champion Color instead!

MakeSplat () {: aria-label='Functions' }

Morph () {: aria-label='Functions' }

???- example "Example Code" This code turns an entity into a gaper.

    entity:ToNPC():Morph(EntityType.ENTITY_GAPER , 0, 0,-1)

PlaySound () {: aria-label='Functions' }

QueryNPCsGroup () {: aria-label='Functions' }

QueryNPCsSpawnerType () {: aria-label='Functions' }

QueryNPCsType () {: aria-label='Functions' }

ResetPathFinderTarget () {: aria-label='Functions' }

void ResetPathFinderTarget ( ) {: .copyable aria-label='Functions' }

ThrowSpider () {: aria-label='Functions' }

Variables

CanShutDoors {: aria-label='Variables' }

boolean CanShutDoors {: .copyable aria-label='Variables' }

ChildNPC {: aria-label='Variables' }

GroupIdx {: aria-label='Variables' }

int GroupIdx {: .copyable aria-label='Variables' }

Used to identify multichunks groups.

I1 {: aria-label='Variables' }

int I1 {: .copyable aria-label='Variables' }

general usage ints for ai_

I2 {: aria-label='Variables' }

int I2 {: .copyable aria-label='Variables' }

same as m_I1

ParentNPC {: aria-label='Variables' }

parent entity, for multi-entity NPCs like Larry Jr.

Pathfinder {: aria-label='Variables' }

ProjectileCooldown {: aria-label='Variables' }

int ProjectileCooldown {: .copyable aria-label='Variables' }

projectiles can fire again when it reaches 0

ProjectileDelay {: aria-label='Variables' }

int ProjectileDelay {: .copyable aria-label='Variables' }

>0: projectile will be fired in n frames

Scale {: aria-label='Variables' }

float Scale {: .copyable aria-label='Variables' }

State {: aria-label='Variables' }

int State {: .copyable aria-label='Variables' }

StateFrame {: aria-label='Variables' }

int StateFrame {: .copyable aria-label='Variables' }

V1 {: aria-label='Variables' }

general usage for ai_* functions, initialized to (0,0)

V2 {: aria-label='Variables' }

like m_V1, in case we need two of those

{: .abp .tooltip .badge }

FireBossProjectiles ( int NumProjectiles, TargetPos, float TrajectoryModifier, Params ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

void FireProjectiles ( Pos, Velocity, ProjectilesMode Mode, Params ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

GetPlayerTarget ( ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

MakeSplat ( float Size ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

boolean Morph ( , int Variant, int SubType, int ChampionColorIdx ) {: .copyable aria-label='Functions' }

Morph the current entity into another one. can be used to turn the entity into a champion. Use :::lua -1 to turn it into a regular entity. A list of Champion colors can be found here :

{: .abp .tooltip .badge }

void PlaySound ( ID, float Volume, int FrameDelay, boolean Loop, float Pitch ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

QueryNPCsGroup ( int GroupIdx ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

QueryNPCsSpawnerType ( SpawnerType, Type, boolean OnlyEnemies ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

QueryNPCsType ( Type, int Variant ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

{: .static .tooltip .badge } {: .abp .tooltip .badge }

static ThrowSpider ( Position, Spawner, TargetPos, boolean Big, float YOffset ) {: .copyable aria-label='Functions' }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

ChildNPC {: .copyable aria-label='Variables' }

{: aria-label='Variables' }

{: .abp .tooltip .badge }

{: .copyable aria-label='Variables' }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

ParentNPC {: .copyable aria-label='Variables' }

{: .abp .tooltip .badge }

Pathfinder {: .copyable aria-label='Variables' }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

{: .abp .tooltip .badge }

V1 {: .copyable aria-label='Variables' }

{: .abp .tooltip .badge }

V2 {: .copyable aria-label='Variables' }

Vector
Vector
EntityProjectile
Vector
ProjectileParams
Vector
Vector
ProjectileParams
Entity
EntityEffect
EntityType
ChampionColorIdx
ChampionColorIdx
SoundEffect
EntityList
EntityList
EntityType
EntityType
EntityList
EntityType
Vector
Entity
Vector
EntityNPC
EntityRef
Entity
EntityRef
EntityNPC
PathFinder
Vector
Vector