Binding of Isaac - Afterbirth+ Lua Reference/Guide
EntityFamiliar Class Reference
Inheritance diagram for EntityFamiliar:
Entity

Public Member Functions

 AddCoins (integer Value)
 
 AddHearts (integer Hearts)
 
 AddKeys (integer Keys)
 
 PickEnemyTarget (float MaxDistance, integer FrameInterval)
 
 FollowParent ()
 
 FollowPosition (Vector Pos)
 
Vector GetOrbitPosition (Vector Pos)
 
 Shoot ()
 
EntityTear FireProjectile (Vector Dir)
 
 PlayChargeAnim (Direction Dir)
 
 PlayShootAnim (Direction Dir)
 
 PlayFloatAnim (Direction Dir)
 
 MoveDelayed (integer NumFrames)
 
 MoveDiagonally (float Speed)
 
integer RecalculateOrbitOffset (integer Layer, boolean Add)
 returns the number of familiars in that layer More...
 
 AddToFollowers ()
 Adds to followers. This doesn't remove other flags! More...
 
 AddToDelayed ()
 Adds to delayed. This doesn't remove other flags! More...
 
 AddToOrbit (integer Layer)
 Adds to orbitals. This doesn't remove other flags! More...
 
 RemoveFromFollowers ()
 
 RemoveFromDelayed ()
 
 RemoveFromOrbit ()
 
- Public Member Functions inherited from Entity
table GetData ()
 
 Update ()
 
 Render (Vector Offset)
 
boolean RenderShadowLayer (Vector Offset)
 
 PostRender ()
 
boolean TakeDamage (float Damage, integer Flags, EntityRef Source, integer DamageCountdown)
 
boolean HasMortalDamage ()
 
 Kill ()
 Kills the entity and makes a blood splat or gibs. More...
 
 Die ()
 
 Remove ()
 
 BloodExplode ()
 Explodes with gibs and blood. More...
 
 AddVelocity (Vector Velocity)
 
 MultiplyFriction (float Value)
 
 SetColor (Color Color, integer Duration, integer Priority, boolean Fadeout, boolean Share)
 
const ColorGetColor ()
 
 SetSpriteFrame (string AnimationName, integer FrameNum)
 
 SetSpriteOverlayFrame (string AnimationName, integer FrameNum)
 
 SetSize (float Size, Vector SizeMulti, integer NumGridCollisionPoints)
 
boolean CollidesWithGrid ()
 
boolean IsEnemy ()
 return true for NPCs that are not controlled by the player More...
 
boolean IsActiveEnemy (boolean includeDead)
 return true for non background NPCs (ex: every enemy except fire and shopkeepers) More...
 
boolean IsVulnerableEnemy ()
 return true for enemies that can be damaged More...
 
boolean IsFlying ()
 
 AddEntityFlags (integer Flags)
 
 ClearEntityFlags (integer Flags)
 
integer GetEntityFlags ()
 
boolean HasEntityFlags (integer Flags)
 
boolean HasFullHealth ()
 
 AddHealth (float HitPoints)
 
 AddPoison (EntityRef Source, integer Duration, float Damage)
 
 AddFreeze (EntityRef Source, integer Duration)
 
 AddSlowing (EntityRef Source, integer Duration, float SlowValue, Color SlowColor)
 Makes the friction higher. More...
 
 AddCharmed (integer Duration)
 
 AddConfusion (EntityRef Source, integer Duration, boolean IgnoreBosses)
 
 AddMidasFreeze (EntityRef Source, integer Duration)
 
 AddFear (EntityRef Source, integer Duration)
 
 AddBurn (EntityRef Source, integer Duration, float Damage)
 
 AddShrink (EntityRef Source, integer Duration)
 
 RemoveStatusEffects ()
 
boolean Exists ()
 
boolean IsDead ()
 
boolean IsVisible ()
 
boolean IsInvincible ()
 
boolean CanShutDoors ()
 enemies keep the doors shut More...
 
boolean IsBoss ()
 bosses display health bar More...
 
BossId GetBossID ()
 
EntityGetLastParent ()
 
EntityGetLastChild ()
 
boolean HasCommonParentWithEntity (Entity Other)
 
boolean IsFrame (integer Frame, integer Offset)
 true every X frames More...
 
RNGGetDropRNG ()
 
SpriteGetSprite ()
 
EntityPlayer ToPlayer ()
 
EntityEffect ToEffect ()
 
EntityNPC ToNPC ()
 
EntityPickup ToPickup ()
 
EntityFamiliar ToFamiliar ()
 
EntityBomb ToBomb ()
 
EntityKnife ToKnife ()
 
EntityLaser ToLaser ()
 
EntityTear ToTear ()
 
EntityProjectile ToProjectile ()
 

Static Public Member Functions

static Vector GetOrbitDistance (integer Layer)
 

Public Attributes

EntityPlayerPlayer
 
integer Coins
 
integer Hearts
 
integer Keys
 
integer FireCooldown
 
integer HeadFrameDelay
 
Direction MoveDirection
 
Direction ShootDirection
 
Direction LastDirection
 
float OrbitAngleOffset
 
Vector OrbitDistance
 
integer State
 
integer RoomClearCount
 
- Public Attributes inherited from Entity
float Friction
 loaded from entity config More...
 
Vector Position
 
Vector Velocity
 
const EntityType Type
 
integer Variant
 void SetType(eEntityType Type); More...
 
integer SubType
 
EntityType SpawnerType
 
integer SpawnerVariant
 
const ColorSplatColor
 
boolean Visible
 
const VectorPositionOffset
 
integer RenderZOffset
 
boolean FlipX
 
const VectorSpriteOffset
 
const VectorSpriteScale
 
float SpriteRotation
 
Vector SizeMulti
 
float Mass
 
float MaxHitPoints
 
float HitPoints
 
const integer Index
 
const VectorTargetPosition
 
GridCollisionClass GridCollisionClass
 
EntityCollisionClass EntityCollisionClass
 
float CollisionDamage
 
const integer SpawnGridIndex
 
EntityParent
 
EntityChild
 
EntityTarget
 
EntitySpawnerEntity
 
const integer FrameCount
 
const integer InitSeed
 
const integer DropSeed
 
float DepthOffset
 

Member Function Documentation

◆ AddCoins()

EntityFamiliar::AddCoins ( integer  Value)

◆ AddHearts()

EntityFamiliar::AddHearts ( integer  Hearts)

◆ AddKeys()

EntityFamiliar::AddKeys ( integer  Keys)

◆ AddToDelayed()

EntityFamiliar::AddToDelayed ( )

Adds to delayed. This doesn't remove other flags!

◆ AddToFollowers()

EntityFamiliar::AddToFollowers ( )

Adds to followers. This doesn't remove other flags!

◆ AddToOrbit()

EntityFamiliar::AddToOrbit ( integer  Layer)

Adds to orbitals. This doesn't remove other flags!

◆ FireProjectile()

EntityTear EntityFamiliar::FireProjectile ( Vector  Dir)

Shoots a projectile from the center of the familiar in the direction you defined.

If used on a familiar that shoots multiple projectiles (example: harlequin baby), this function will only return the left most projectile based on the direction.

If used on familiars with special tears (example: Lil Brimstone,...), this will just shoot a regular tear.

This function will not play the shoot animation of the familiar.

◆ FollowParent()

EntityFamiliar::FollowParent ( )

◆ FollowPosition()

EntityFamiliar::FollowPosition ( Vector  Pos)

◆ GetOrbitDistance()

static Vector EntityFamiliar::GetOrbitDistance ( integer  Layer)
static

◆ GetOrbitPosition()

Vector EntityFamiliar::GetOrbitPosition ( Vector  Pos)

Returns the position of an orbiting familiar relative to the player's position. Returns Vector(0,0) if its a normal familiar.

The "pos" argument is used as an offset.

◆ MoveDelayed()

EntityFamiliar::MoveDelayed ( integer  NumFrames)

◆ MoveDiagonally()

EntityFamiliar::MoveDiagonally ( float  Speed)

◆ PickEnemyTarget()

EntityFamiliar::PickEnemyTarget ( float  MaxDistance,
integer  FrameInterval 
)

◆ PlayChargeAnim()

EntityFamiliar::PlayChargeAnim ( Direction  Dir)

◆ PlayFloatAnim()

EntityFamiliar::PlayFloatAnim ( Direction  Dir)

◆ PlayShootAnim()

EntityFamiliar::PlayShootAnim ( Direction  Dir)

◆ RecalculateOrbitOffset()

integer EntityFamiliar::RecalculateOrbitOffset ( integer  Layer,
boolean  Add 
)

Returns the number of familiars in that layer.

◆ RemoveFromDelayed()

EntityFamiliar::RemoveFromDelayed ( )

◆ RemoveFromFollowers()

EntityFamiliar::RemoveFromFollowers ( )

◆ RemoveFromOrbit()

EntityFamiliar::RemoveFromOrbit ( )

◆ Shoot()

EntityFamiliar::Shoot ( )
This function does not seem to work.

Member Data Documentation

◆ Coins

integer EntityFamiliar::Coins

◆ FireCooldown

integer EntityFamiliar::FireCooldown

◆ HeadFrameDelay

integer EntityFamiliar::HeadFrameDelay

◆ Hearts

integer EntityFamiliar::Hearts

◆ Keys

integer EntityFamiliar::Keys

◆ LastDirection

Direction EntityFamiliar::LastDirection

◆ MoveDirection

Direction EntityFamiliar::MoveDirection

◆ OrbitAngleOffset

float EntityFamiliar::OrbitAngleOffset

Can be used to override the angular position of the familiar on its orbit based on the initial starting position of the orbit.

This code will make all of your orbitals move as a tight wall around you.
for i,v in ipairs(Isaac.GetRoomEntities()) do 
    if v.Type==3 then 
        v:ToFamiliar().OrbitAngleOffset = 0.25*i 
    end 
end

Result:

◆ OrbitDistance

Vector EntityFamiliar::OrbitDistance

Defines the orbit of the familiar, if its an orbital. The Vector is interpreted as the dimensions of the circle/oval orbit. Example: Vector(110,90) is the orbital of "Forever alone".

◆ Player

EntityPlayer& EntityFamiliar::Player

◆ RoomClearCount

integer EntityFamiliar::RoomClearCount

◆ ShootDirection

Direction EntityFamiliar::ShootDirection

◆ State

integer EntityFamiliar::State