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

Public Member Functions

 AddHeight (float Value)
 
 AddFallingSpeed (float Value)
 
 AddFallingAccel (float Value)
 
 AddChangeFlags (integer Flags)
 
 AddScale (float Value)
 
 AddProjectileFlags (integer Flags)
 
- 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 ()
 

Public Attributes

float Height
 
float FallingSpeed
 
float FallingAccel
 
float HomingStrength
 
float CurvingStrength
 
float Acceleration
 
integer WiggleFrameOffset
 
integer ChangeFlags
 
float ChangeVelocity
 
integer ChangeTimeout
 
float Scale
 
integer ProjectileFlags
 
float DepthOffset
 
float Damage
 
- 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

◆ AddChangeFlags()

EntityProjectile::AddChangeFlags ( integer  Flags)

◆ AddFallingAccel()

EntityProjectile::AddFallingAccel ( float  Value)

◆ AddFallingSpeed()

EntityProjectile::AddFallingSpeed ( float  Value)

◆ AddHeight()

EntityProjectile::AddHeight ( float  Value)

◆ AddProjectileFlags()

EntityProjectile::AddProjectileFlags ( integer  Flags)

Uses ProjectileFlags to define the projectile attributes.

◆ AddScale()

EntityProjectile::AddScale ( float  Value)

Member Data Documentation

◆ Acceleration

float EntityProjectile::Acceleration

◆ ChangeFlags

integer EntityProjectile::ChangeFlags

Uses ProjectileFlags to define the projectile attributes after the "Changed" state was activated.

The ProjectileFlag CHANGE_FLAGS_AFTER_TIMEOUT needs to be set to allow for this change to apply!


Informations about "Changed" State:
Projectiles can have two states: normal (default) and changed.
Changed state activates when projectile's frame count reaches the value set in ChangeTimeout. After that its flags get changed to what was set in ChangeFlags and velocity will be resized to length set in ChangeVelocity.


Also used in: ProjectileParams()

◆ ChangeTimeout

integer EntityProjectile::ChangeTimeout

Number of frames that need to elapse after spawn till the "Changed" state is activated.

The ProjectileFlags CHANGE_FLAGS_AFTER_TIMEOUT or CHANGE_VELOCITY_AFTER_TIMEOUT need to be set to allow for this change to apply!


Informations about "Changed" State:
Projectiles can have two states: normal (default) and changed.
Changed state activates when projectile's frame count reaches the value set in ChangeTimeout. After that its flags get changed to what was set in ChangeFlags and velocity will be resized to length set in ChangeVelocity.


Also used in: ProjectileParams()

◆ ChangeVelocity

float EntityProjectile::ChangeVelocity

Velocity value that gets applied when the "Changed" state is activated.

The ProjectileFlag CHANGE_VELOCITY_AFTER_TIMEOUT need to be set to allow for this change to apply!


Informations about "Changed" State:
Projectiles can have two states: normal (default) and changed.
Changed state activates when projectile's frame count reaches the value set in ChangeTimeout. After that its flags get changed to what was set in ChangeFlags and velocity will be resized to length set in ChangeVelocity.


Also used in: ProjectileParams()

◆ CurvingStrength

float EntityProjectile::CurvingStrength

◆ Damage

float EntityProjectile::Damage

◆ DepthOffset

float EntityProjectile::DepthOffset

◆ FallingAccel

float EntityProjectile::FallingAccel

◆ FallingSpeed

float EntityProjectile::FallingSpeed

◆ Height

float EntityProjectile::Height

Defines the height of a projectile. Height should be a negative value. Default is -23.

◆ HomingStrength

float EntityProjectile::HomingStrength

◆ ProjectileFlags

integer EntityProjectile::ProjectileFlags

Uses ProjectileFlags to define the projectile attributes.

◆ Scale

float EntityProjectile::Scale

◆ WiggleFrameOffset

integer EntityProjectile::WiggleFrameOffset