Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
Public Member Functions | |
RenderGlow (Vector position) | |
RenderBody (Vector position) | |
RenderHead (Vector position) | |
RenderTop (Vector position) | |
string | GetName () |
AddMaxHearts (integer MaxHearts, boolean IgnoreKeeper) | |
boolean | HasFullHearts () |
boolean | HasFullHeartsAndSoulHearts () |
AddHearts (integer Hearts) | |
AddEternalHearts (integer EternalHearts) | |
AddSoulHearts (integer SoulHearts) | |
AddBlackHearts (integer BlackHearts) | |
RemoveBlackHeart (integer BlackHeart) | |
boolean | IsBlackHeart (integer Heart) |
AddJarHearts (integer Hearts) | |
integer | GetJarHearts () |
AddJarFlies (integer Flies) | |
integer | GetJarFlies () |
AddCoins (integer Amount) | |
AddBombs (integer Amount) | |
AddKeys (integer Amount) | |
AddGoldenKey () | |
RemoveGoldenKey () | |
AddGoldenBomb () | |
RemoveGoldenBomb () | |
AddGoldenHearts (integer Hearts) | |
Entity & | AddBlueSpider (Vector Position) |
Entity & | ThrowBlueSpider (Vector Position, Vector Target) |
RemoveBlueSpider () | |
Entity & | AddBlueFlies (integer Amount, Vector Position, Entity Target) |
RemoveBlueFly () | |
AddPrettyFly () | |
boolean | TryUseKey () |
AddCostume (Config::Item Item, boolean ItemStateOnly) | |
AddNullCostume (Config::NullItemID NullId) | |
for Lua More... | |
RemoveCostume (Config::Item Item) | |
RemoveSkinCostume () | |
ClearCostumes () | |
QueueItem (Config::Item Item, integer Charge, boolean Touched) | |
Add Collectible/Trinket after animation is finished. More... | |
boolean | FlushQueueItem () |
called after animation is finished, or on special occasions to prevent bugs More... | |
boolean | IsItemQueueEmpty () |
AddCollectible (CollectibleType Type, integer Charge, boolean AddConsumables) | |
integer | GetCollectibleCount () |
AddTrinket (TrinketType Type) | |
s32 GetCollectibleNum( eCollectibleType Collectible ) const; More... | |
boolean | TryRemoveTrinket (TrinketType Type) |
DropTrinket (Vector DropPos, boolean ReplaceTick) | |
integer | GetMaxTrinkets () |
integer | GetMaxPoketItems () |
DropPoketItem (integer PocketNum, Vector Pos) | |
RemoveCollectible (CollectibleType Type) | |
ClearTemporaryEffects () | |
Will be called when player exits the room. More... | |
DonateLuck (integer Luck) | |
boolean | CanPickBlackHearts () |
returns true if player has room for more black hearts More... | |
boolean | CanPickGoldenHearts () |
returns true if player has room for more golden hearts More... | |
CollectibleType | GetActiveItem () |
TODO: Replace those calls with new class/structure that contains all item information. More... | |
integer | GetActiveCharge () |
integer | GetBatteryCharge () |
integer | GetActiveSubCharge () |
SetActiveCharge (integer Charge) | |
DischargeActiveItem () | |
boolean | NeedsCharge () |
boolean | FullCharge () |
return true if the item was fully charged, false otherwise. If player has battery it will first try to fill first charge slot, then the battery slot. More... | |
const PlayerPocketItem & | GetPocketItem (integer SlotId) |
AddCard (Card Card) | |
AddPill (PillColor Pill) | |
Card | GetCard (integer SlotId) |
PillColor | GetPill (integer SlotId) |
SetCard (integer SlotId, Card Card) | |
SetPill (integer SlotId, PillColor Pill) | |
boolean | HasCollectible (CollectibleType Type) |
integer | GetCollectibleNum (CollectibleType Type) |
boolean | HasTrinket (TrinketType Type) |
boolean | HasPlayerForm (PlayerForm Form) |
boolean | CanAddCollectible () |
boolean | TryHoldTrinket (TrinketType Type) |
SetFullHearts () | |
AddCacheFlags (integer Flags) | |
Reevaluate Damage, Firerate, Shot speed. More... | |
EvaluateItems () | |
RespawnFamiliars () | |
Entity & | GetNPCTarget () |
Direction | GetMovementDirection () |
Direction | GetFireDirection () |
Direction | GetHeadDirection () |
const Vector & | GetAimDirection () |
const Vector & | GetMovementVector () |
const Vector & | GetRecentMovementVector () |
Returns the joystick direction that drives player movement, taking into account certain modifiers like disabled controls and seed effects. More... | |
Vector | GetMovementJoystick () |
Vector | GetShootingJoystick () |
boolean | AreOpposingShootDirectionsPressed () |
Returns the non-zero joystick direction from the most recent movement input, but goes to zero after the player comes to a stop. More... | |
const Vector & | GetLastDirection () |
const Vector & | GetVelocityBeforeUpdate () |
float | GetSmoothBodyRotation () |
float | GetTearPoisonDamage () |
integer | GetBombFlags () |
EntityBomb::BombVariant | GetBombVariant (integer TearFlags, boolean ForceSmallBomb) |
Pass tear flags to add extra effects to the bomb visual like burn -> hot bombs, even if player doesn't have Hot Bombs collectible. ForceSmallBomb will override large bomb variants for TEAR_PERSISTENT. More... | |
TearParams | GetTearHitParams (WeaponType WeaponType, float DamageScale, integer TearDisplacement) |
integer | GetHearts () |
integer | GetMaxHearts () |
integer | GetSoulHearts () |
integer | GetBlackHearts () |
This does not return the # of black hearts, this returns the bit mask for which soul hearts are black hearts. More... | |
integer | GetEternalHearts () |
integer | GetExtraLives () |
integer | GetNumBombs () |
integer | GetNumKeys () |
boolean | HasGoldenKey () |
boolean | HasGoldenBomb () |
integer | GetGoldenHearts () |
integer | GetNumCoins () |
PlayerType | GetPlayerType () |
TrinketType | GetTrinket (integer TrinketIndex) |
integer | GetNumBlueFlies () |
integer | GetNumBlueSpiders () |
CollectibleType | GetItemState () |
UseActiveItem (CollectibleType Item, boolean ShowAnim, boolean KeepActiveItem, boolean AllowNonMainPlayer, boolean ToAddCostume) | |
integer | GetTearRangeModifier () |
integer | GetTrinketMultiplier () |
TemporaryEffects & | GetEffects () |
boolean | HasWeaponType (WeaponType WeaponType) |
Entity & | GetActiveWeaponEntity () |
Entity & | GetTractorBeam () |
boolean | CanPickupItem () |
Can Player pick up an item right now? More... | |
boolean | IsHoldingItem () |
Is Player holding up an item (card/collectible/etc) More... | |
boolean | IsHeldItemVisible () |
Revive () | |
revive player More... | |
TryRemoveCollectibleCostume (CollectibleType Collectible, boolean KeepPersistent) | |
tries to remove a costume based on some filters More... | |
TryRemoveTrinketCostume (TrinketType Trinket) | |
tries to remove a costume based on some filters More... | |
TryRemoveNullCostume (Config::NullItemID NullId) | |
AnimateCollectible (CollectibleType Collectible, string AnimName, string SpriteAnimName) | |
AnimateTrinket (TrinketType Trinket, string AnimName, string SpriteAnimName) | |
AnimateCard (Card Card, string AnimName) | |
AnimatePill (PillColor Pill, string AnimName) | |
AnimateTrapdoor () | |
end of a stage More... | |
AnimateLightTravel () | |
end of a stage More... | |
AnimateAppear () | |
beginning of a stage More... | |
AnimateTeleport (boolean Up) | |
teleport to another room More... | |
AnimateHappy () | |
thumbs up More... | |
AnimateSad () | |
oh no! More... | |
AnimatePitfallIn () | |
Fall into pitfall. More... | |
AnimatePitfallOut () | |
Jump out of pitfall. More... | |
boolean | IsExtraAnimationFinished () |
StopExtraAnimation () | |
AddControlsCooldown (integer Cooldown) | |
PlayExtraAnimation (string Animation) | |
QueueExtraAnimation (string Animation) | |
integer | GetDamageCooldown () |
ResetDamageCooldown () | |
SetMinDamageCooldown (integer DamageCooldown) | |
boolean | AreControlsEnabled () |
UseCard (Card Card) | |
UsePill (PillEffect PillEffect, PillColor PillColor) | |
boolean | HasInvincibility () |
returns true when player is in an invincibility state More... | |
SetShootingCooldown (integer Cooldown) | |
SetTargetTrapDoor (GridEntity TrapDoor) | |
EntityLaser & | FireDelayedBrimstone (float Angle, Entity Parent) |
const EntityRef & | GetLastDamageSource () |
integer | GetLastDamageFlags () |
integer | GetTotalDamageTaken () |
EntityTear & | FireTear (Vector Position, Vector Velocity, boolean CanBeEye, boolean NoTractorBeam, boolean CanTriggerStreakEnd) |
EntityBomb & | FireBomb (Vector Position, Vector Velocity) |
EntityLaser & | FireBrimstone (Vector Direction) |
EntityLaser & | FireTechLaser (Vector Position, LaserOffset OffsetID, Vector Direction, boolean LeftEye, boolean OneHit) |
EntityLaser & | FireTechXLaser (Vector Position, Vector Direction, float Radius) |
EntityKnife & | FireKnife (Entity Parent, float RotationOffset, boolean CantOverwrite, integer SubType) |
BabySubType | GetBabySkin () |
boolean | CanShoot () |
boolean | IsP2Appearing () |
boolean | IsFullSpriteRendering () |
RNG & | GetCollectibleRNG (CollectibleType ID) |
RNG & | GetTrinketRNG (TrinketType ID) |
RNG & | GetPillRNG (PillEffect ID) |
RNG & | GetCardRNG (Card ID) |
AddDeadEyeCharge () | |
ClearDeadEyeCharge () | |
CollectibleType | GetZodiacEffect () |
boolean | IsPosInSpotLight (Vector Position) |
MultiShotParams | GetMultiShotParams () |
PosVel | GetMultiShotPositionVelocity (integer LoopIndex, WeaponType Weapon, Vector ShotDirection, float ShotSpeed, MultiShotParams params) |
Call this function in a loop with values from 0 to MultiShotParams.NumProjectiles-1 (inclusive) More... | |
Vector | GetFlyingOffset () |
boolean | WillPlayerRevive () |
integer | GetLastActionTriggers () |
float | GetGreedDonationBreakChance () |
Vector | GetMovementInput () |
Vector | GetShootingInput () |
boolean | HasTimedItem () |
Kept for avoiding modding issues. More... | |
InitBabySkin () | |
boolean | CanTurnHead () |
returns true if head should react to keys or false otherwise More... | |
CheckFamiliar (integer FamiliarVariant, integer TargetCount, RNG rng) | |
UpdateCanShoot () | |
Vector | GetLaserOffset (LaserOffset ID, Vector Direction) |
Vector | GetTearMovementInheritance (Vector ShotDirection) |
Vector | GetCostumeNullPos (string NullFrameName, boolean HeadScale, Vector Direction) |
ReplaceCostumeSprite (Config::Item Item, string SpritePath, integer SpriteId) | |
AddPlayerFormCostume (PlayerForm Form) | |
ResetItemState () | |
Made this public so Room transtiions can call this to prevent lock ups. More... | |
EntityLaser & | SpawnMawOfVoid (integer Timeout) |
AddDollarBillEffect () | |
ShootRedCandle (Vector Direction) | |
for ghost pepper item + poop and farts More... | |
DoZitEffect (Vector Direction) | |
SwapActiveItems () | |
AddBoneHearts (integer Hearts) | |
integer | GetBoneHearts () |
boolean | IsBoneHeart (integer heart) |
integer | GetEffectiveMaxHearts () |
integer | GetHeartLimit () |
boolean | CanPickRedHearts () |
boolean | CanPickSoulHearts () |
returns true if player has room for more soul hearts More... | |
boolean | CanPickBoneHearts () |
returns true if player has room for more bone hearts More... | |
boolean | IsSubPlayer () |
EntityPlayer & | GetSubPlayer () |
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 Color & | GetColor () |
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 () |
Entity & | GetLastParent () |
Entity & | GetLastChild () |
boolean | HasCommonParentWithEntity (Entity Other) |
boolean | IsFrame (integer Frame, integer Offset) |
true every X frames More... | |
RNG & | GetDropRNG () |
Sprite & | GetSprite () |
EntityPlayer | ToPlayer () |
EntityEffect | ToEffect () |
EntityNPC | ToNPC () |
EntityPickup | ToPickup () |
EntityFamiliar | ToFamiliar () |
EntityBomb | ToBomb () |
EntityKnife | ToKnife () |
EntityLaser | ToLaser () |
EntityTear | ToTear () |
EntityProjectile | ToProjectile () |
Public Attributes | |
const Vector & | TearsOffset |
boolean | ControlsEnabled |
integer | ControlsCooldown |
const EntityDesc & | FriendBallEnemy |
Vector | SpriteScale |
const integer | ControllerIndex |
s32 GetItemStateCooldown( void ) const { return m_ItemStateCooldown; } More... | |
integer | FireDelay |
How long until the player can spawn their next tear? More... | |
integer | MaxFireDelay |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Tears Stat. How long between each tear can spawn? More... | |
float | ShotSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the ShotSpeed Stat. How fast does the tear travel when spawned? More... | |
float | Damage |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Damage Stat. How much damage do the players tears or other main weapons do? More... | |
float | TearHeight |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Range Stat * -1. How high above the ground is the tear when it spawns? More... | |
float | TearFallingSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How fast is the tear moving up or down when it spawns? Affects range. More... | |
float | TearFallingAcceleration |
float | MoveSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Speed Stat. How fast can the player move? More... | |
integer | TearFlags |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Various tear flags More... | |
Color | TearColor |
Color | LaserColor |
boolean | CanFly |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Can the player fly over rocks and pits? More... | |
float | Luck |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Luck Stat. Better luck generally means better random events. More... | |
BabySubType | BabySkin |
QueueItemData | QueuedItem |
integer | ItemHoldCooldown |
Used for avoiding player get stucked between rocks when switching a flying item with other active item. More... | |
ActiveItemDesc | SecondaryActiveItem |
integer | HeadFrameDelay |
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 Color & | SplatColor |
boolean | Visible |
const Vector & | PositionOffset |
integer | RenderZOffset |
boolean | FlipX |
const Vector & | SpriteOffset |
const Vector & | SpriteScale |
float | SpriteRotation |
Vector | SizeMulti |
float | Mass |
float | MaxHitPoints |
float | HitPoints |
const integer | Index |
const Vector & | TargetPosition |
GridCollisionClass | GridCollisionClass |
EntityCollisionClass | EntityCollisionClass |
float | CollisionDamage |
const integer | SpawnGridIndex |
Entity & | Parent |
Entity & | Child |
Entity & | Target |
Entity & | SpawnerEntity |
const integer | FrameCount |
const integer | InitSeed |
const integer | DropSeed |
float | DepthOffset |
EntityPlayer::AddBlackHearts | ( | integer | BlackHearts | ) |
Adds Black hearts to the player. 1 unit is half a heart. Remove them with negative numbers.
Isaac.GetPlayer(0):AddBlackHearts(2)
EntityPlayer::AddBombs | ( | integer | Amount | ) |
Adds bombs to the player. Remove them with negative numbers.
Isaac.GetPlayer(0):AddBombs(-1)
EntityPlayer::AddBoneHearts | ( | integer | Hearts | ) |
Adds bone hearts to the player. 1 unit is a single bone heart. Remove them with negative numbers.
Isaac.GetPlayer(0):AddBoneHearts(1)
EntityPlayer::AddCacheFlags | ( | CacheFlag | CacheFlag | ) |
Will reevaluate the cache flags provided in the next cache reevaluation.
EntityPlayer::AddCard | ( | Card | Card | ) |
EntityPlayer::AddCoins | ( | integer | Amount | ) |
Adds coins to the player. Remove them with negative numbers.
Isaac.GetPlayer(0):AddCoins(1)
EntityPlayer::AddCollectible | ( | CollectibleType | Type, |
integer | Charge, | ||
boolean | AddConsumables | ||
) |
EntityPlayer::AddControlsCooldown | ( | integer | Cooldown | ) |
EntityPlayer::AddCostume | ( | Config::Item | Item, |
boolean | ItemStateOnly | ||
) |
EntityPlayer::AddDeadEyeCharge | ( | ) |
EntityPlayer::AddDollarBillEffect | ( | ) |
EntityPlayer::AddEternalHearts | ( | integer | EternalHearts | ) |
Adds eternal hearts to the player. 1 unit is half a heart. Remove them with negative numbers.
(Note that eternal hearts automatically turn to full hearts, when you have more than one.)
Isaac.GetPlayer(0):AddEternalHearts(1)
EntityPlayer::AddGoldenBomb | ( | ) |
EntityPlayer::AddGoldenHearts | ( | integer | Hearts | ) |
Adds golden hearts to the player. 1 unit is a single gold heart. Remove them with negative numbers.
Isaac.GetPlayer(0):AddGoldenHearts(1)
EntityPlayer::AddGoldenKey | ( | ) |
EntityPlayer::AddHearts | ( | integer | Hearts | ) |
Adds red hearts to the player if there are any empty heart containers. 1 unit is half a heart. Remove health with negative numbers.
Isaac.GetPlayer(0):AddHearts(2)
EntityPlayer::AddJarFlies | ( | integer | Flies | ) |
EntityPlayer::AddJarHearts | ( | integer | Hearts | ) |
EntityPlayer::AddKeys | ( | integer | Amount | ) |
Adds keys to the player. Remove them with negative numbers.
Isaac.GetPlayer(0):AddKeys(1)
EntityPlayer::AddMaxHearts | ( | integer | MaxHearts, |
boolean | IgnoreKeeper | ||
) |
Adds heart containers to the player. 2 units is a full heart container. Remove them with negative numbers.
Isaac.GetPlayer(0):AddMaxHearts(2,true)
EntityPlayer::AddNullCostume | ( | Config::NullItemID | NullId | ) |
for Lua
EntityPlayer::AddPill | ( | PillColor | Pill | ) |
EntityPlayer::AddPlayerFormCostume | ( | PlayerForm | Form | ) |
EntityPlayer::AddPrettyFly | ( | ) |
EntityPlayer::AddSoulHearts | ( | integer | SoulHearts | ) |
Adds soul hearts to the player. 1 unit is half a heart. Remove them with negative numbers.
Isaac.GetPlayer(0):AddSoulHearts(2)
EntityPlayer::AddTrinket | ( | TrinketType | Type | ) |
EntityPlayer::AnimateAppear | ( | ) |
Play the animation that is normally played at the beginning of a stage.
EntityPlayer::AnimateCard | ( | Card | Card, |
string | AnimName | ||
) |
EntityPlayer::AnimateCollectible | ( | CollectibleType | Collectible, |
string | AnimName, | ||
string | SpriteAnimName | ||
) |
EntityPlayer::AnimateHappy | ( | ) |
thumbs up
EntityPlayer::AnimateLightTravel | ( | ) |
end of a stage
EntityPlayer::AnimatePill | ( | PillColor | Pill, |
string | AnimName | ||
) |
EntityPlayer::AnimatePitfallIn | ( | ) |
Fall into pitfall.
EntityPlayer::AnimatePitfallOut | ( | ) |
Jump out of pitfall.
EntityPlayer::AnimateSad | ( | ) |
oh no!
EntityPlayer::AnimateTeleport | ( | boolean | Up | ) |
teleport to another room
EntityPlayer::AnimateTrapdoor | ( | ) |
end of a stage
EntityPlayer::AnimateTrinket | ( | TrinketType | Trinket, |
string | AnimName, | ||
string | SpriteAnimName | ||
) |
boolean EntityPlayer::AreControlsEnabled | ( | ) |
boolean EntityPlayer::AreOpposingShootDirectionsPressed | ( | ) |
Returns the non-zero joystick direction from the most recent movement input, but goes to zero after the player comes to a stop.
boolean EntityPlayer::CanAddCollectible | ( | ) |
boolean EntityPlayer::CanPickBlackHearts | ( | ) |
returns true if player has room for more black hearts
boolean EntityPlayer::CanPickBoneHearts | ( | ) |
returns true if player has room for more bone hearts
boolean EntityPlayer::CanPickGoldenHearts | ( | ) |
returns true if player has room for more golden hearts
boolean EntityPlayer::CanPickRedHearts | ( | ) |
boolean EntityPlayer::CanPickSoulHearts | ( | ) |
returns true if player has room for more soul hearts
boolean EntityPlayer::CanPickupItem | ( | ) |
Can Player pick up an item right now?
boolean EntityPlayer::CanShoot | ( | ) |
boolean EntityPlayer::CanTurnHead | ( | ) |
returns true if head should react to keys or false otherwise
EntityPlayer::CheckFamiliar | ( | integer | FamiliarVariant, |
integer | TargetCount, | ||
RNG | rng | ||
) |
EntityPlayer::ClearCostumes | ( | ) |
EntityPlayer::ClearDeadEyeCharge | ( | ) |
EntityPlayer::ClearTemporaryEffects | ( | ) |
Will be called when player exits the room.
EntityPlayer::DischargeActiveItem | ( | ) |
Sets the charge of your active item to 0 without triggering the active item effect.
EntityPlayer::DonateLuck | ( | integer | Luck | ) |
EntityPlayer::DoZitEffect | ( | Vector | Direction | ) |
EntityPlayer::DropPoketItem | ( | integer | PocketNum, |
Vector | Pos | ||
) |
Drops a held pocketitem (Card, Pill, Rune...) from the given itemslot at the given position. Possible pocketnumbers are [0, 1]
This function is spelled wrong.
Removing the pocketitem in slot 0, while having a second item in slot 1 will not update the UI correctly. The second item will still be in the second slot, which will in turn prevent the player from using this card right away. The player needs to switch between cards to fix this.
EntityPlayer::DropTrinket | ( | Vector | DropPos, |
boolean | ReplaceTick | ||
) |
EntityPlayer::EvaluateItems | ( | ) |
Triggers a cache reevaluation. Will trigger the MC_EVALUATE_CACHE callback.
EntityBomb& EntityPlayer::FireBomb | ( | Vector | Position, |
Vector | Velocity | ||
) |
EntityLaser& EntityPlayer::FireBrimstone | ( | Vector | Direction | ) |
EntityLaser& EntityPlayer::FireDelayedBrimstone | ( | float | Angle, |
Entity | Parent | ||
) |
EntityKnife& EntityPlayer::FireKnife | ( | Entity | Parent, |
float | RotationOffset, | ||
boolean | CantOverwrite, | ||
integer | SubType | ||
) |
EntityTear& EntityPlayer::FireTear | ( | Vector | Position, |
Vector | Velocity, | ||
boolean | CanBeEye, | ||
boolean | NoTractorBeam, | ||
boolean | CanTriggerStreakEnd | ||
) |
This replaces the protected fire_tear() to allow other entities (Such as bombs) to easily shoot tears in the same manner and with all the effects the player does. (Ex. Sad Bombs)
EntityLaser& EntityPlayer::FireTechLaser | ( | Vector | Position, |
LaserOffset | OffsetID, | ||
Vector | Direction, | ||
boolean | LeftEye, | ||
boolean | OneHit | ||
) |
EntityLaser& EntityPlayer::FireTechXLaser | ( | Vector | Position, |
Vector | Direction, | ||
float | Radius | ||
) |
boolean EntityPlayer::FlushQueueItem | ( | ) |
called after animation is finished, or on special occasions to prevent bugs
boolean EntityPlayer::FullCharge | ( | ) |
Fully charges the active item. Returns true if the item was fully charged, false otherwise. If player has battery it will first try to fill first charge slot, then the battery slot.
integer EntityPlayer::GetActiveCharge | ( | ) |
Get the current charge of your active item.
CollectibleType EntityPlayer::GetActiveItem | ( | ) |
Returns the currently held item.
integer EntityPlayer::GetActiveSubCharge | ( | ) |
Get the current items subcharge. (Useful for items that charge up over time.)
Entity& EntityPlayer::GetActiveWeaponEntity | ( | ) |
const Vector& EntityPlayer::GetAimDirection | ( | ) |
BabySubType EntityPlayer::GetBabySkin | ( | ) |
integer EntityPlayer::GetBatteryCharge | ( | ) |
Get the current charge progress of the second charge of your current active item. This bar is only active, when you have the Collectible "The Battery"
integer EntityPlayer::GetBlackHearts | ( | ) |
This does not return the # of black hearts, this returns the bit mask for which soul hearts are black hearts.
integer EntityPlayer::GetBombFlags | ( | ) |
EntityBomb::BombVariant EntityPlayer::GetBombVariant | ( | integer | TearFlags, |
boolean | ForceSmallBomb | ||
) |
Pass tear flags to add extra effects to the bomb visual like burn -> hot bombs, even if player doesn't have Hot Bombs collectible. ForceSmallBomb will override large bomb variants for TEAR_PERSISTENT.
integer EntityPlayer::GetBoneHearts | ( | ) |
Returns the number of bone hearts as an integer value. 1 Boneheart = 1.
local player = Isaac.GetPlayer(0)
player:GetMaxHearts()+player:GetBoneHearts()*2
Card EntityPlayer::GetCard | ( | integer | SlotId | ) |
Gets the ID of the card the player is holding in the given itemslot (0 or 1).
integer EntityPlayer::GetCollectibleCount | ( | ) |
integer EntityPlayer::GetCollectibleNum | ( | CollectibleType | Type | ) |
RNG& EntityPlayer::GetCollectibleRNG | ( | CollectibleType | ID | ) |
Vector EntityPlayer::GetCostumeNullPos | ( | string | NullFrameName, |
boolean | HeadScale, | ||
Vector | Direction | ||
) |
integer EntityPlayer::GetDamageCooldown | ( | ) |
integer EntityPlayer::GetEffectiveMaxHearts | ( | ) |
Returns the amount of Red Hearts the player can contain in their Heart Containers and Bone Hearts. 1 unit is half a red heart.
Example: you have 3 red heart container and one bone heart. 6(red) + 2(bone) = 8
TemporaryEffects& EntityPlayer::GetEffects | ( | ) |
integer EntityPlayer::GetEternalHearts | ( | ) |
Returns the amount of eternal hearts the player has.
integer EntityPlayer::GetExtraLives | ( | ) |
Direction EntityPlayer::GetFireDirection | ( | ) |
Vector EntityPlayer::GetFlyingOffset | ( | ) |
integer EntityPlayer::GetGoldenHearts | ( | ) |
Returns the amount of golden hearts the player has.
float EntityPlayer::GetGreedDonationBreakChance | ( | ) |
Direction EntityPlayer::GetHeadDirection | ( | ) |
integer EntityPlayer::GetHeartLimit | ( | ) |
integer EntityPlayer::GetHearts | ( | ) |
Returns the amount of red hearts the player has inside their heart containers and bone hearts. 1 unit is half a heart.
CollectibleType EntityPlayer::GetItemState | ( | ) |
integer EntityPlayer::GetJarFlies | ( | ) |
integer EntityPlayer::GetJarHearts | ( | ) |
Vector EntityPlayer::GetLaserOffset | ( | LaserOffset | ID, |
Vector | Direction | ||
) |
integer EntityPlayer::GetLastActionTriggers | ( | ) |
integer EntityPlayer::GetLastDamageFlags | ( | ) |
const EntityRef& EntityPlayer::GetLastDamageSource | ( | ) |
const Vector& EntityPlayer::GetLastDirection | ( | ) |
integer EntityPlayer::GetMaxHearts | ( | ) |
Returns the amount of Heart Containers the player has. 1 unit is half a heart container.
integer EntityPlayer::GetMaxPoketItems | ( | ) |
Get the number of Pickup items you can carry. (1 on default. 2 with belly button or similar)
This function is spelled wrong.
integer EntityPlayer::GetMaxTrinkets | ( | ) |
Get the number of trinkets you can carry. (1 on default. 2 with moms purse or similar)
Direction EntityPlayer::GetMovementDirection | ( | ) |
Vector EntityPlayer::GetMovementInput | ( | ) |
Vector EntityPlayer::GetMovementJoystick | ( | ) |
const Vector& EntityPlayer::GetMovementVector | ( | ) |
MultiShotParams EntityPlayer::GetMultiShotParams | ( | ) |
PosVel EntityPlayer::GetMultiShotPositionVelocity | ( | integer | LoopIndex, |
WeaponType | Weapon, | ||
Vector | ShotDirection, | ||
float | ShotSpeed, | ||
MultiShotParams | params | ||
) |
Call this function in a loop with values from 0 to MultiShotParams.NumProjectiles-1 (inclusive)
string EntityPlayer::GetName | ( | ) |
Returns the name of the player. (Isaac, Cain, Azazel,...)
Entity& EntityPlayer::GetNPCTarget | ( | ) |
normally returns the player itself. Can redirect enemy attacks to a different entity such as Best Friend
integer EntityPlayer::GetNumBlueFlies | ( | ) |
integer EntityPlayer::GetNumBlueSpiders | ( | ) |
integer EntityPlayer::GetNumBombs | ( | ) |
integer EntityPlayer::GetNumCoins | ( | ) |
integer EntityPlayer::GetNumKeys | ( | ) |
PillColor EntityPlayer::GetPill | ( | integer | SlotId | ) |
Gets the ID of the pill the player is holding in the given itemslot (0 or 1).
RNG& EntityPlayer::GetPillRNG | ( | PillEffect | ID | ) |
PlayerType EntityPlayer::GetPlayerType | ( | ) |
const PlayerPocketItem& EntityPlayer::GetPocketItem | ( | integer | SlotId | ) |
Get the userdata of the pocketitem (Card,Pill,rune) in a said slot.
This function returns userdata, which cant be processed. It is therefore broken and should not be used!
const Vector& EntityPlayer::GetRecentMovementVector | ( | ) |
Returns the joystick direction that drives player movement, taking into account certain modifiers like disabled controls and seed effects.
Vector EntityPlayer::GetShootingInput | ( | ) |
Vector EntityPlayer::GetShootingJoystick | ( | ) |
float EntityPlayer::GetSmoothBodyRotation | ( | ) |
integer EntityPlayer::GetSoulHearts | ( | ) |
Returns the amount of Soul Hearts the player has. 1 unit is half a heart.
EntityPlayer& EntityPlayer::GetSubPlayer | ( | ) |
TearParams EntityPlayer::GetTearHitParams | ( | WeaponType | WeaponType, |
float | DamageScale, | ||
integer | TearDisplacement | ||
) |
float EntityPlayer::GetTearPoisonDamage | ( | ) |
integer EntityPlayer::GetTearRangeModifier | ( | ) |
integer EntityPlayer::GetTotalDamageTaken | ( | ) |
Entity& EntityPlayer::GetTractorBeam | ( | ) |
TrinketType EntityPlayer::GetTrinket | ( | integer | TrinketIndex | ) |
Gets the ID of the trinket the player is holding in the given trinketslot (0 or 1).
integer EntityPlayer::GetTrinketMultiplier | ( | ) |
RNG& EntityPlayer::GetTrinketRNG | ( | TrinketType | ID | ) |
const Vector& EntityPlayer::GetVelocityBeforeUpdate | ( | ) |
CollectibleType EntityPlayer::GetZodiacEffect | ( | ) |
boolean EntityPlayer::HasCollectible | ( | CollectibleType | Type | ) |
boolean EntityPlayer::HasFullHearts | ( | ) |
boolean EntityPlayer::HasFullHeartsAndSoulHearts | ( | ) |
boolean EntityPlayer::HasGoldenBomb | ( | ) |
boolean EntityPlayer::HasGoldenKey | ( | ) |
boolean EntityPlayer::HasInvincibility | ( | ) |
returns true when player is in an invincibility state
boolean EntityPlayer::HasPlayerForm | ( | PlayerForm | Form | ) |
boolean EntityPlayer::HasTimedItem | ( | ) |
Kept for avoiding modding issues.
boolean EntityPlayer::HasTrinket | ( | TrinketType | Type | ) |
boolean EntityPlayer::HasWeaponType | ( | WeaponType | WeaponType | ) |
EntityPlayer::InitBabySkin | ( | ) |
boolean EntityPlayer::IsBlackHeart | ( | integer | Heart | ) |
boolean EntityPlayer::IsBoneHeart | ( | integer | heart | ) |
boolean EntityPlayer::IsExtraAnimationFinished | ( | ) |
boolean EntityPlayer::IsFullSpriteRendering | ( | ) |
boolean EntityPlayer::IsHeldItemVisible | ( | ) |
boolean EntityPlayer::IsHoldingItem | ( | ) |
Is Player holding up an item (card/collectible/etc)
boolean EntityPlayer::IsItemQueueEmpty | ( | ) |
boolean EntityPlayer::IsP2Appearing | ( | ) |
boolean EntityPlayer::IsPosInSpotLight | ( | Vector | Position | ) |
boolean EntityPlayer::IsSubPlayer | ( | ) |
This is for players that require multiple player entities, such as the Forgotten (this has nothing to do with co-players!)
boolean EntityPlayer::NeedsCharge | ( | ) |
EntityPlayer::PlayExtraAnimation | ( | string | Animation | ) |
EntityPlayer::QueueExtraAnimation | ( | string | Animation | ) |
EntityPlayer::QueueItem | ( | Config::Item | Item, |
integer | Charge, | ||
boolean | Touched | ||
) |
Add Collectible/Trinket after animation is finished.
EntityPlayer::RemoveBlackHeart | ( | integer | BlackHeart | ) |
EntityPlayer::RemoveBlueFly | ( | ) |
EntityPlayer::RemoveBlueSpider | ( | ) |
EntityPlayer::RemoveCollectible | ( | CollectibleType | Type | ) |
EntityPlayer::RemoveCostume | ( | Config::Item | Item | ) |
EntityPlayer::RemoveGoldenBomb | ( | ) |
EntityPlayer::RemoveGoldenKey | ( | ) |
EntityPlayer::RemoveSkinCostume | ( | ) |
EntityPlayer::RenderBody | ( | Vector | position | ) |
EntityPlayer::RenderGlow | ( | Vector | position | ) |
EntityPlayer::RenderHead | ( | Vector | position | ) |
EntityPlayer::RenderTop | ( | Vector | position | ) |
EntityPlayer::ReplaceCostumeSprite | ( | Config::Item | Item, |
string | SpritePath, | ||
integer | SpriteId | ||
) |
EntityPlayer::ResetDamageCooldown | ( | ) |
EntityPlayer::ResetItemState | ( | ) |
Made this public so Room transtiions can call this to prevent lock ups.
EntityPlayer::RespawnFamiliars | ( | ) |
EntityPlayer::Revive | ( | ) |
revive player
EntityPlayer::SetActiveCharge | ( | integer | Charge | ) |
EntityPlayer::SetCard | ( | integer | SlotId, |
Card | Card | ||
) |
Change the card/rune the player is holding in the given itemslot (0 or 1).
EntityPlayer::SetFullHearts | ( | ) |
EntityPlayer::SetMinDamageCooldown | ( | integer | DamageCooldown | ) |
EntityPlayer::SetPill | ( | integer | SlotId, |
PillColor | Pill | ||
) |
Change the pill the player is holding in the given itemslot (0 or 1).
EntityPlayer::SetShootingCooldown | ( | integer | Cooldown | ) |
EntityPlayer::SetTargetTrapDoor | ( | GridEntity | TrapDoor | ) |
EntityPlayer::ShootRedCandle | ( | Vector | Direction | ) |
for ghost pepper item + poop and farts
EntityLaser& EntityPlayer::SpawnMawOfVoid | ( | integer | Timeout | ) |
EntityPlayer::StopExtraAnimation | ( | ) |
EntityPlayer::SwapActiveItems | ( | ) |
boolean EntityPlayer::TryHoldTrinket | ( | TrinketType | Type | ) |
Returns true if an active item pickup cooldown is over. returns true if trinket can be added, else false
EntityPlayer::TryRemoveCollectibleCostume | ( | CollectibleType | Collectible, |
boolean | KeepPersistent | ||
) |
tries to remove a costume based on some filters
EntityPlayer::TryRemoveNullCostume | ( | Config::NullItemID | NullId | ) |
boolean EntityPlayer::TryRemoveTrinket | ( | TrinketType | Type | ) |
EntityPlayer::TryRemoveTrinketCostume | ( | TrinketType | Trinket | ) |
tries to remove a costume based on some filters
boolean EntityPlayer::TryUseKey | ( | ) |
EntityPlayer::UpdateCanShoot | ( | ) |
EntityPlayer::UseActiveItem | ( | CollectibleType | Item, |
boolean | ShowAnim, | ||
boolean | KeepActiveItem, | ||
boolean | AllowNonMainPlayer, | ||
boolean | ToAddCostume | ||
) |
EntityPlayer::UseCard | ( | Card | Card | ) |
EntityPlayer::UsePill | ( | PillEffect | PillEffect, |
PillColor | PillColor | ||
) |
boolean EntityPlayer::WillPlayerRevive | ( | ) |
BabySubType EntityPlayer::BabySkin |
P2 Skin section Used to hold the selected skin (in case of glitched baby it will pick a random one)
boolean EntityPlayer::CanFly |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Can the player fly over rocks and pits?
const integer EntityPlayer::ControllerIndex |
s32 GetItemStateCooldown( void ) const { return m_ItemStateCooldown; }
integer EntityPlayer::ControlsCooldown |
boolean EntityPlayer::ControlsEnabled |
float EntityPlayer::Damage |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Damage Stat. How much damage do the players tears or other main weapons do?
integer EntityPlayer::FireDelay |
How long until the player can spawn their next tear?
const EntityDesc& EntityPlayer::FriendBallEnemy |
integer EntityPlayer::HeadFrameDelay |
integer EntityPlayer::ItemHoldCooldown |
Used for avoiding player get stucked between rocks when switching a flying item with other active item.
Color EntityPlayer::LaserColor |
float EntityPlayer::Luck |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Luck Stat. Better luck generally means better random events.
integer EntityPlayer::MaxFireDelay |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Tears Stat. How long between each tear can spawn?
float EntityPlayer::MoveSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Speed Stat. How fast can the player move?
QueueItemData EntityPlayer::QueuedItem |
item queue for when the player is picking up an item. the item is in effect as soon as the animation is finished and will be removed from the queue.
ActiveItemDesc EntityPlayer::SecondaryActiveItem |
float EntityPlayer::ShotSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the ShotSpeed Stat. How fast does the tear travel when spawned?
Vector EntityPlayer::SpriteScale |
Color EntityPlayer::TearColor |
float EntityPlayer::TearFallingAcceleration |
float EntityPlayer::TearFallingSpeed |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How fast is the tear moving up or down when it spawns? Affects range.
integer EntityPlayer::TearFlags |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Various tear flags.
local mod:OnEvaluateTearFlags(player, flag)
player.TearFlags = player.TearFlags | TearFlags.TEAR_SPECTRAL
end
mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, mod.OnEvaluateTearFlags, CacheFlag.CACHE_TEARFLAG)
float EntityPlayer::TearHeight |
Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Range Stat * -1. How high above the ground is the tear when it spawns?
local mod:OnEvaluateRange(player, flag)
-- we give -5 because the TearHeight stat is always negative; the lower the number - the further the tear travels
player.TearHeight = player.TearHeight - 5
end
mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, mod.OnEvaluateRange, CacheFlag.CACHE_RANGE)
const Vector& EntityPlayer::TearsOffset |