Skip to content

Class "EntityPlayer"⚓︎

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 EntityTear
    Entity <|-- EntityBomb
    Entity <|-- EntityEffect
    Entity <|-- EntityFamiliar
    Entity <|-- EntityKnife
    Entity <|-- EntityLaser
    Entity <|-- EntityNPC
    Entity <|-- EntityPickup
    Entity <|-- EntityPlayer
    Entity <|-- EntityProjectile
    Entity <|-- EntityTear
    link Entity "Entity.html" "Go to page for 'Entity' class"
    link EntityBomb "EntityBomb.html" "Go to page for 'EntityBomb' class"
    link EntityEffect "EntityEffect.html" "Go to page for 'EntityEffect' class"
    link EntityFamiliar "EntityFamiliar.html" "Go to page for 'EntityFamiliar' class"
    link EntityKnife "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 "EntityProjectile.html" "Go to page for 'EntityProjectile' class"
    link EntityTear "EntityTear.html" "Go to page for 'EntityTear' class"

Functions⚓︎

Add·Black·Hearts ()⚓︎

void AddBlackHearts ( int BlackHearts )⚓︎

Adds Black hearts to the player. 1 unit is half a heart. Remove them with negative numbers.

Example Code

This code adds 1 full black heart to the player.

1
Isaac.GetPlayer():AddBlackHearts(2)


Add·Blood·Charge ()⚓︎

void AddBloodCharge ( int Amount )⚓︎

Only works on Tainted Bethany.


Add·Blue·Flies ()⚓︎

Entity AddBlueFlies ( int Amount, Vector Position, Entity Target )⚓︎


Add·Blue·Spider ()⚓︎

Entity AddBlueSpider ( Vector Position )⚓︎


Add·Bombs ()⚓︎

void AddBombs ( int Amount )⚓︎

Adds bombs to the player. Remove them with negative numbers.

Example Code

This code removes 1 bomb from the player.

1
Isaac.GetPlayer():AddBombs(-1)


Add·Bone·Hearts ()⚓︎

void AddBoneHearts ( int Hearts )⚓︎

Adds bone hearts to the player. 1 unit is a single bone heart. Remove them with negative numbers.

Example Code

This code adds 1 bone heart to the player.

1
Isaac.GetPlayer():AddBoneHearts(1)


Add·Broken·Hearts ()⚓︎

void AddBrokenHearts ( int BrokenHearts )⚓︎

Adds broken hearts to the player. 1 unit is one broken heart. Broken hearts can be removed with negative numbers.

Example Code

This code adds 1 broken heart to the player, then takes it away.

1
2
Isaac.GetPlayer():AddBrokenHearts(1)
Isaac.GetPlayer():AddBrokenHearts(-1)


Add·Cache·Flags ()⚓︎

void AddCacheFlags ( CacheFlag CacheFlag )⚓︎

Will reevaluate the cache flags provided in the next cache reevaluation.

Example Code

This code will add several cacheflags.

1
Isaac.GetPlayer():AddCacheFlags(CacheFlag.CACHE_DAMAGE | CacheFlag.CACHE_FIREDELAY | CacheFlag.CACHE_LUCK)


Add·Card ()⚓︎

void AddCard ( Card ID )⚓︎


Add·Coins ()⚓︎

void AddCoins ( int Amount )⚓︎

Adds coins to the player. Remove them with negative numbers.

Example Code

This code adds 1 coin to the player.

1
Isaac.GetPlayer():AddCoins(1)


Add·Collectible ()⚓︎

void AddCollectible ( CollectibleType Type, int Charge = 0, boolean FirstTimePickingUp = true, ActiveSlot Slot = ActiveSlot.SLOT_PRIMARY, int VarData = 0)⚓︎

Setting FirstTimePickingUp to false will not add the consumables (keys, bombs,...) of the item and will cause it to not count towards transformations.

Slot 0 is default (normal active item) Slot 1 is used by Schoolbag Slot 2 is used for pocket active items

Notes

Slot 2 cannot be used if character did not start with a pocket active

VarData is used for the storage of a persistent context-sensitive value

Notes

This is a list of all items that make use of VarData: - Jar of Wisps: Wisps spawned on next use (Max 12) - D Infinity, Blank Card, Clear Rune, Placebo: Current maximum charge (Any value above 0) - Hold: Stored poop

Poop Types: [0] None [1] Normal [2] Flies [3] Fire [4] Petrified [5] Toxic [6] Black [7] Holy [8] X-Lax [9] Fart [10] Bomb [11] Explosive Diarrhea [12+] Empty


Add·Controls·Cooldown ()⚓︎

void AddControlsCooldown ( int Cooldown )⚓︎


Add·Costume ()⚓︎

void AddCostume ( ItemConfigItem Item, boolean ItemStateOnly )⚓︎


Add·Curse·Mist·Effect ()⚓︎

void AddCurseMistEffect ( )⚓︎


Add·Dead·Eye·Charge ()⚓︎

void AddDeadEyeCharge ( )⚓︎


Add·Dollar·Bill·Effect ()⚓︎

void AddDollarBillEffect ( )⚓︎


Add·Eternal·Hearts ()⚓︎

void AddEternalHearts ( int 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.)

Example Code

This code adds 1 eternal heart to the player.

1
Isaac.GetPlayer():AddEternalHearts(1)


Add·Friendly·Dip ()⚓︎

void AddFriendlyDip ( int Subtype, Vector Position )⚓︎

Dip Subtypes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
0: normal
1: red
2: corny
3: golden
4: rainbow
5: black
6: holy
12: stone
13: flaming
14: poison
20: brownie

Add·Giga·Bombs ()⚓︎

void AddGigaBombs ( int GigaBombs )⚓︎

Notes

Giga bombs do not add to the bomb counter, make sure to increase the bomb count beforehand! You can't add more giga bombs than player's current bomb count.


Add·Golden·Bomb ()⚓︎

void AddGoldenBomb ( )⚓︎


Add·Golden·Hearts ()⚓︎

void AddGoldenHearts ( int Hearts )⚓︎

Adds golden hearts to the player. 1 unit is a single gold heart. Remove them with negative numbers.

Example Code

This code adds 1 golden heart to the player.

1
Isaac.GetPlayer():AddGoldenHearts(1)


Add·Golden·Key ()⚓︎

void AddGoldenKey ( )⚓︎


Add·Hearts ()⚓︎

void AddHearts ( int 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.

Example Code

This code adds 1 full red heart to the player.

1
Isaac.GetPlayer():AddHearts(2)


Add·Item·Wisp ()⚓︎

EntityFamiliar AddItemWisp ( CollectibleType Collectible, Vector Position, boolean AdjustOrbitLayer = false )⚓︎


Add·Jar·Flies ()⚓︎

void AddJarFlies ( int Flies )⚓︎


Add·Jar·Hearts ()⚓︎

void AddJarHearts ( int Hearts )⚓︎


Add·Keys ()⚓︎

void AddKeys ( int Amount )⚓︎

Adds keys to the player. Remove them with negative numbers.

Example Code

This code adds 1 key to the player.

1
Isaac.GetPlayer():AddKeys(1)


Add·Max·Hearts ()⚓︎

void AddMaxHearts ( int MaxHearts, boolean IgnoreKeeper )⚓︎

Adds heart containers to the player. 2 units is a full heart container. Remove them with negative numbers.

Notes

It is possible to add a half heart container to the player. This will appear as a regular heart container but can only be filled half-way.

Example Code

This code adds 1 heart container to the player.

1
Isaac.GetPlayer():AddMaxHearts(2,true)

Bugs

IgnoreKeeper does not appear to work as intended.

Max hearts can be added or removed from Keeper regardless of what this boolean is. If Keeper has Greed's Gullet and this boolean is set to false, max hearts cannot be added to Keeper, but can be removed normally. If Keeper has Greed's Gullet and this boolean is set to true, Max hearts can be added or removed from Keeper normally.


Add·Minisaac ()⚓︎

EntityFamiliar AddMinisaac ( Vector Position, boolean PlayAnim = true )⚓︎


Add·Null·Costume ()⚓︎

void AddNullCostume ( NullItemID NullId )⚓︎


Add·Pill ()⚓︎

void AddPill ( PillColor Pill )⚓︎


Add·Player·Form·Costume ()⚓︎

void AddPlayerFormCostume ( PlayerForm Form )⚓︎

Adds the costume of the given transformation.


Add·Poop·Mana ()⚓︎

void AddPoopMana ( int Num )⚓︎

Adds (or remove) poop consumables from the player


Add·Pretty·Fly ()⚓︎

void AddPrettyFly ( )⚓︎


Add·Rotten·Hearts ()⚓︎

void AddRottenHearts ( int RottenHearts )⚓︎

Adds rotten hearts to the player. 1 unit is half a heart. Remove rotten hearts with negative numbers.

Example Code

This code adds 1 full rotten heart to the player.

1
Isaac.GetPlayer():AddRottenHearts(2)


Add·Soul·Charge ()⚓︎

void AddSoulCharge ( int Amount )⚓︎

Adds one soul heart to Bethany's charge, equivalent to a half soul heart.

Notes

This function will only work when playing as Bethany.


Add·Soul·Hearts ()⚓︎

void AddSoulHearts ( int SoulHearts )⚓︎

Adds soul hearts to the player. 1 unit is half a heart. Remove them with negative numbers.

Example Code

This code adds 1 full soul heart to the player.

1
Isaac.GetPlayer():AddSoulHearts(2)


Add·Swarm·Fly·Orbital ()⚓︎

EntityFamiliar AddSwarmFlyOrbital ( Vector Position )⚓︎


Add·Trinket ()⚓︎

void AddTrinket ( TrinketType Type, boolean FirstTimePickingUp = true )⚓︎

  • If the player does not have any open trinket slots, this function will do nothing.
  • If the player has an open trinket slot but already has a trinket, the new trinket will go to the first slot and the existing trinket will get pushed back to the second slot.
  • If you provide an argument of 0 or an otherwise invalid trinket ID, the game will crash.
  • Setting FirstTimePickingUp to false will not spawn or add pickups for the item and will not cause it to count towards transformations.

Add·Wisp ()⚓︎

EntityFamiliar AddWisp ( CollectibleType Collectible, Vector Position, boolean AdjustOrbitLayer = false, boolean DontUpdate = false )⚓︎

The type of Wisp can be defined with the Collectible. If the ID is not corresponding to an active item with a special wisp, it will default to the regular blue wisp.

To access special wisp variant like Delirious forms, you need to add 65536 (1 << 16) to the id. Example: Delirious Monstro has id = s14, so the wisps id is 65550.


Animate·Appear ()⚓︎

void AnimateAppear ( )⚓︎

Play the animation that is normally played at the beginning of a stage.


Animate·Card ()⚓︎

void AnimateCard ( Card ID, string AnimName = "Pickup" )⚓︎


Animate·Collectible ()⚓︎

void AnimateCollectible ( CollectibleType Collectible, string AnimName = "Pickup", string SpriteAnimName = "PlayerPickupSparkle" )⚓︎


Animate·Happy ()⚓︎

void AnimateHappy ( )⚓︎

Plays the happy animation, played when taking a positive pill.

Example Code

This code plays the happy animation.

1
2
local player = Isaac.GetPlayer()
player:AnimateHappy()

Animate·Light·Travel ()⚓︎

void AnimateLightTravel ( )⚓︎

Plays the animation that is played when entering the light in the ascent, or entering the cathedral.

Example Code

Plays the animation.

1
2
local player = Isaac.GetPlayer()
player:AnimateLightTravel()


Animate·Pickup ()⚓︎

void AnimatePickup ( Sprite sprite, boolean HideShadow = false, string AnimName = "Pickup" )⚓︎

Plays a pickup animation using any supplied Sprite object HideShadow should be usually set to true when rendering a sprite with a custom shadow layer


Animate·Pill ()⚓︎

void AnimatePill ( PillColor Pill, string AnimName = "Pickup" )⚓︎


Animate·Pitfall·In ()⚓︎

void AnimatePitfallIn ( )⚓︎

Does 1/2 heart of damage and plays the animation of falling into a pitfall.


Animate·Pitfall·Out ()⚓︎

void AnimatePitfallOut ( )⚓︎

The animation of jumping back out of a pitfall.


Animate·Sad ()⚓︎

void AnimateSad ( )⚓︎

Plays the sad animation, played when taking a negative pill.

Example Code

Plays the sad animation.

1
2
    local player = Isaac.GetPlayer()
player:AnimateSad()


Animate·Teleport ()⚓︎

void AnimateTeleport ( boolean Up )⚓︎

The animation played when teleporting into another room.


Animate·Trapdoor ()⚓︎

void AnimateTrapdoor ( )⚓︎

Plays the animation of the player jumping down a trapdoor. ???- example "Example Code" Plays the animation of jumping down a trapdoor. local player = Isaac.GetPlayer() player:AnimateTrapdoor()


Animate·Trinket ()⚓︎

void AnimateTrinket ( TrinketType Trinket, string AnimName = "Pickup", string SpriteAnimName = "PlayerPickupSparkle" )⚓︎


Are·Controls·Enabled ()⚓︎

boolean AreControlsEnabled ( )⚓︎


Are·Opposing·Shoot·Directions·Pressed ()⚓︎

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.


Can·Add·Collectible ()⚓︎

boolean CanAddCollectible ( CollectibleType Type = CollectibleType.COLLECTIBLE_NULL )⚓︎


Can·Pick·Black·Hearts ()⚓︎

boolean CanPickBlackHearts ( )⚓︎

returns true if player has room for more black hearts


Can·Pick·Bone·Hearts ()⚓︎

boolean CanPickBoneHearts ( )⚓︎

returns true if player has room for more bone hearts


Can·Pick·Golden·Hearts ()⚓︎

boolean CanPickGoldenHearts ( )⚓︎

returns true if player has room for more golden hearts


Can·Pick·Red·Hearts ()⚓︎

boolean CanPickRedHearts ( )⚓︎


Can·Pick·Rotten·Hearts ()⚓︎

boolean CanPickRottenHearts ( )⚓︎

Returns true if player has room for more rotten hearts


Can·Pick·Soul·Hearts ()⚓︎

boolean CanPickSoulHearts ( )⚓︎

Returns true if player has room for more soul hearts


Can·Pickup·Item ()⚓︎

boolean CanPickupItem ( )⚓︎

Can Player pick up an item right now?


Can·Shoot ()⚓︎

boolean CanShoot ( )⚓︎


Can·Turn·Head ()⚓︎

boolean CanTurnHead ( )⚓︎

Returns true if head should react to keys or false otherwise


Change·Player·Type ()⚓︎

void ChangePlayerType ( PlayerType PlayerType )⚓︎

Used to change one player into another player type. For example turning Cain into Maggy.

Changing the player type within MC_POST_PLAYER_INIT will result in the player getting the default items for that character. E.g. Maggy will get her Yum Heart without you having to explicitly add it. Exceptions here include unlockable items (e.g. Isaac's D6) and default numbers of hearts/keys/bombs/coins. You can change the player type after init, but then you're generally responsible for adding any items you might associate with that character.

Changing the player Type into Jacob will also spawn Esau.


Check·Familiar ()⚓︎

void CheckFamiliar ( int FamiliarVariant, int TargetCount, RNG rng, ItemConfigItem SourceItemConfigItem = nil, int FamiliarSubType = -1 )⚓︎

Call this method to spawn the appropriate amount of familiars associated with a custom collectible.

  • If the target count specified is less than the current amount of familiars, it will spawn more until the target count is met.
  • If the target count specified is than the current amount of familiars, it will despawn familiars until the target count is met.

This is meant to be called in the EvaluateCache callback (when the cache flag is equal to CacheFlag.CACHE_FAMILIARS).

Note that this function is bugged in that it will not increment the provided RNG. This is bad because if you provide the player's collectible RNG as the argument for rng, the resulting spawned familiars will potentially have the same InitSeed as familiars spawned previously on the same run. Since InitSeed is the main way to identiy unique familiars, it is important that each familiar has a unique InitSeed. Thus, a brand new RNG object should always be passed to the EntityPlayer.CheckFamiliar method so that each new spawned familiar will have a new, random InitSeed. Subsequently, you should handle random familiar events not with an RNG object based on the familiar's InitSeed, but with a data structure that maps familiar InitSeedto RNG objects that are initialized based on the seed from the EntityPlayer.GetCollectibleRNG method.

In most cases, IsaacScript users should use the checkFamiliarFromCollectibles helper function instead of using this method directly, as it automatically calculates the appropriate target count.

FamiliarVariant: In most cases, use the familiar variant for your custom familiar.

TargetCount: The expected amount of this FamiliarVariant that this EntityPlayer should have. This argument can simply be how many of an item that the current EntityPlayer owns. However, if you want your familiar to synergize with Monster Manual and Box of Friends, then this argument should be EntityPlayer:GetCollectibleNum(collectibleType) + EntityPlayer:GetEffects():GetCollectibleEffectNum(collectibleType).

rng: Always use a brand new RNG object. (See the previous explanation on why you should not use the RNG from the EntityPlayer.GetCollectibleRNG method.)

SourceItemConfigItem: The ItemConfigItem that this familiar was created by. This is nil by default, but it should always be specified so that Sacrificial Altar will work properly. (It informs the game which collectible should be removed if the familiar is tagged with the "cansacrifice" entity tag.) This can be obtained with: Isaac.GetItemConfig():GetCollectible(collectibleType)

FamiliarSubType: The subtype of the familiar to check. -1 matches any subtype.

Example Code

This code spawns 3 "Sister Maggy" familiars.

1
2
3
4
5
6
local player = Isaac.GetPlayer()
local sourceCollectibleID = CollectibleType.COLLECTIBLE_SAD_ONION
local collectibleRNG = player:GetCollectibleRNG(sourceCollectibleID)
local itemConfig = Isaac.GetItemConfig():GetCollectible(sourceCollectibleID)

player:CheckFamiliar(FamiliarVariant.SISTER_MAGGY, 3, collectibleRNG, itemConfig)


Clear·Costumes ()⚓︎

void ClearCostumes ( )⚓︎

Removes all costumes.


Clear·Dead·Eye·Charge ()⚓︎

void ClearDeadEyeCharge ( )⚓︎


Clear·Temporary·Effects ()⚓︎

void ClearTemporaryEffects ( )⚓︎

Will be called when player exits the room.


Discharge·Active·Item ()⚓︎

void DischargeActiveItem ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

Sets the charge of your active item to 0 without triggering the active item effect.


Donate·Luck ()⚓︎

void DonateLuck ( int Luck )⚓︎


Do·Zit·Effect ()⚓︎

void DoZitEffect ( Vector Direction )⚓︎

Fires a creep shot, same as the one fired by the item "The Large Zit"


Drop·Pocket·Item ()⚓︎

void DropPocketItem ( int PocketNum, Vector Pos )⚓︎

Drops a held pocketitem (Card, Pill, Rune... from the given itemslot at the given position. Possible pocketnumbers are [0, 1, 2, 3]. Dropping pocket active items or dice bag dices does not work.


Drop·Trinket ()⚓︎

void DropTrinket ( Vector DropPos, boolean ReplaceTick )⚓︎


Evaluate·Items ()⚓︎

void EvaluateItems ( )⚓︎

Triggers a cache reevaluation. Will trigger the MC_EVALUATE_CACHE callback.

Before you use this function, you need to set the appropriate cache flags first. See the example below.

Example Code

This code re-evaluates all of the stats for the player.

1
2
3
local player = Isaac.GetPlayer()
player:AddCacheFlags(CacheFlag.CACHE_ALL)
player:EvaluateItems()


Fire·Bomb ()⚓︎

EntityBomb FireBomb ( Vector Position, Vector Velocity, Entity Source = nil )⚓︎


Fire·Brimstone ()⚓︎

EntityLaser FireBrimstone ( Vector Direction, Entity Source = nil, float DamageMultiplier = 1 )⚓︎


Fire·Delayed·Brimstone ()⚓︎

EntityLaser FireDelayedBrimstone ( float Angle, Entity Parent )⚓︎


Fire·Knife ()⚓︎

EntityKnife FireKnife ( Entity Parent, float RotationOffset = 0, boolean CantOverwrite = false, int SubType = 0, int Variant = 0 )⚓︎


Fire·Tear ()⚓︎

EntityTear FireTear ( Vector Position, Vector Velocity, boolean CanBeEye = true, boolean NoTractorBeam = false, boolean CanTriggerStreakEnd = true, Entity Source = nil, float DamageMultiplier = 1 )⚓︎

  • CanBeEye: If the player has the Evil Eye item, passing true allows the tear to have a chance of being an eye.
  • NoTractorBeam: If the player has the Tractor Beam item, passing true means that the tear will be exempt from the beam.
  • CanTriggerStreakEnd: If the player has the Dead Eye item, passing false means that the tear will be exempt from ending the streak.

Fire·Tech·Laser ()⚓︎

EntityLaser FireTechLaser ( Vector Position, LaserOffset OffsetID, Vector Direction, boolean LeftEye, boolean OneHit = false, Entity Source = nil, float DamageMultiplier = 1 )⚓︎

Bugs

The DamageMultiplier parameter doesn't do anything when supplying LASER_TECH2_OFFSET as the offset.


Fire·Tech·XLaser ()⚓︎

EntityLaser FireTechXLaser ( Vector Position, Vector Direction, float Radius, Entity Source = nil, float DamageMultiplier = 1 )⚓︎


Flush·Queue·Item ()⚓︎

boolean FlushQueueItem ( )⚓︎

called after animation is finished, or on special occasions to prevent bugs


Full·Charge ()⚓︎

boolean FullCharge ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY, int Force = false )⚓︎

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.

Force: If set, items will always be charged even if they normally cannot be recharged by batteries


Get·Active·Charge ()⚓︎

int GetActiveCharge ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

Get the current charge of your active item.


Get·Active·Item ()⚓︎

CollectibleType GetActiveItem ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

Returns the currently held item. Returns 0 when no item is held.


Get·Active·Sub·Charge ()⚓︎

int GetActiveSubCharge ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

Get the current items subcharge.

Bug

This function seems to always return 0. Use EntityPlayer:GetActiveCharge() to get any type of charges instead. Use EntityPlayer:GetBatteryCharge() to get the charge of the second charge bar.


Get·Active·Weapon·Entity ()⚓︎

Entity GetActiveWeaponEntity ( )⚓︎


Get·Aim·Direction ()⚓︎

const Vector GetAimDirection ( )⚓︎


Get·Baby·Skin ()⚓︎

BabySubType GetBabySkin ( )⚓︎


Get·Battery·Charge ()⚓︎

int GetBatteryCharge ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

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"


Get·Black·Hearts ()⚓︎

int GetBlackHearts ( )⚓︎

This does not return the number of black hearts; it returns the bit mask for which soul hearts are black hearts.

Example

Imagine we have the following setup of hearts, where S is a soul heart and B is a black heart:

1
B S S B B S S B B

Calling the function will return:

1
Isaac.GetPlayer():GetBlackHearts() -- returns 409, which is 0001 1001 1001 in binary. Therefore, the read order is right to left.

Get·Blood·Charge ()⚓︎

int GetBloodCharge ( )⚓︎


Get·Body·Color ()⚓︎

SkinColor GetBodyColor ( )⚓︎


Get·Bomb·Flags ()⚓︎

int GetBombFlags ( )⚓︎


Get·Bomb·Variant ()⚓︎

BombVariant GetBombVariant ( TearFlags 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.


Get·Bone·Hearts ()⚓︎

int GetBoneHearts ( )⚓︎

Returns the amount of bone hearts that the player has. This is not doubled like the EntityPlayer.GetMaxHearts method is, so if e.g. the player has 3 bone hearts, this will return 3.

Also see the EntityPlayer.GetEffectiveMaxHearts method, which accounts for bone hearts.


Get·Broken·Hearts ()⚓︎

int GetBrokenHearts ( )⚓︎

Returns the amount of broken hearts that the player has. This is not doubled like the EntityPlayer.GetMaxHearts method is, so if e.g. the player has 3 broken hearts, this will return 3.


Get·Card ()⚓︎

Card GetCard ( int SlotId )⚓︎

Gets the ID of the card the player is holding in the given itemslot (0 = Main slot, 1 = secondary slot, 2 or 3). Returns 0 when no card is held in the slot.


Get·Card·RNG ()⚓︎

RNG GetCardRNG ( Card ID )⚓︎


Get·Collectible·Count ()⚓︎

int GetCollectibleCount ( )⚓︎


Get·Collectible·Num ()⚓︎

int GetCollectibleNum ( CollectibleType Type, boolean OnlyCountTrueItems = false )⚓︎

OnlyCountTrueItems: If set to true, the function only counts collectibles that the player actually owns and ignores things like Lilith's Incubus, items granted by 3 Dollar Bill, and so forth.


Get·Collectible·RNG ()⚓︎

RNG GetCollectibleRNG ( CollectibleType ID )⚓︎

Gets the RNG object of a collectible.

Example Code

this code gives you the RNG object of the "Sad Onion" collectible.

1
2
local player = Isaac.GetPlayer()
local collectibleRNG = player:GetCollectibleRNG(CollectibleType.COLLECTIBLE_SAD_ONION)


Get·Costume·Null·Pos ()⚓︎

Vector GetCostumeNullPos ( string NullFrameName, boolean HeadScale, Vector Direction )⚓︎


Get·Damage·Cooldown ()⚓︎

int GetDamageCooldown ( )⚓︎


Get·Effective·Blood·Charge ()⚓︎

int GetEffectiveBloodCharge ( )⚓︎


Get·Effective·Max·Hearts ()⚓︎

int 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


Get·Effective·Soul·Charge ()⚓︎

int GetEffectiveSoulCharge ( )⚓︎


Get·Effects ()⚓︎

TemporaryEffects GetEffects ( )⚓︎


Get·Eternal·Hearts ()⚓︎

int GetEternalHearts ( )⚓︎

Returns the amount of eternal hearts the player has.


Get·Extra·Lives ()⚓︎

int GetExtraLives ( )⚓︎

Returns the number of extra lives the player currently has.


Get·Fire·Direction ()⚓︎

Direction GetFireDirection ( )⚓︎


Get·Flying·Offset ()⚓︎

Vector GetFlyingOffset ( )⚓︎


Get·Golden·Hearts ()⚓︎

int GetGoldenHearts ( )⚓︎

Returns the amount of golden hearts the player has.


Get·Greed·Donation·Break·Chance ()⚓︎

float GetGreedDonationBreakChance ( )⚓︎


Get·Head·Color ()⚓︎

SkinColor GetHeadColor ( )⚓︎


Get·Head·Direction ()⚓︎

Direction GetHeadDirection ( )⚓︎


Get·Heart·Limit ()⚓︎

int GetHeartLimit ( )⚓︎


Get·Hearts ()⚓︎

int GetHearts ( )⚓︎

Returns the amount of red hearts the player has inside their heart containers and bone hearts. 1 unit is half a heart.


Get·Item·State ()⚓︎

CollectibleType GetItemState ( )⚓︎


Get·Jar·Flies ()⚓︎

int GetJarFlies ( )⚓︎


Get·Jar·Hearts ()⚓︎

int GetJarHearts ( )⚓︎


Get·Laser·Offset ()⚓︎

Vector GetLaserOffset ( LaserOffset ID, Vector Direction )⚓︎


Get·Last·Action·Triggers ()⚓︎

int GetLastActionTriggers ( )⚓︎


Get·Last·Damage·Flags ()⚓︎

int GetLastDamageFlags ( )⚓︎


Get·Last·Damage·Source ()⚓︎

const EntityRef GetLastDamageSource ( )⚓︎


Get·Last·Direction ()⚓︎

const Vector GetLastDirection ( )⚓︎


Get·Main·Twin ()⚓︎

EntityPlayer GetMainTwin ( )⚓︎

Returns the main player of pair characters or the main form of characters with multiple forms.

  • When called on Jacob or Esau, returns Jacob.
  • When called on Tainted Forgotten or Tainted Forgotten's Soul, returns Tainted Forgotten.
  • When called on Tainted Lazarus or Dead Tainted Lazarus, returns themself. If the player has Birthright, then it will return Tainted Lazarus.
  • When called on any other character, returns that character.

Get·Max·Hearts ()⚓︎

int GetMaxHearts ( )⚓︎

Returns the amount of Heart Containers the player has. 1 unit is half a heart container.


Get·Max·Pocket·Items ()⚓︎

int GetMaxPocketItems ( )⚓︎

Get the number of Pickup items you can carry. (1 on default. 2 with belly button or similar)

If you have a pocket active, it also increments the number by one.


Get·Max·Poop·Mana ()⚓︎

int GetMaxPoopMana ( )⚓︎

Returns the max amount of poop consumables that can be held by the player


Get·Max·Trinkets ()⚓︎

int GetMaxTrinkets ( )⚓︎

Get the number of trinkets you can carry. (1 on default. 2 with moms purse or similar)


Get·Modeling·Clay·Effect ()⚓︎

CollectibleType GetModelingClayEffect ( )⚓︎


Get·Movement·Direction ()⚓︎

Direction GetMovementDirection ( )⚓︎


Get·Movement·Input ()⚓︎

const Vector GetMovementInput ( )⚓︎


Get·Movement·Joystick ()⚓︎

Vector GetMovementJoystick ( )⚓︎


Get·Movement·Vector ()⚓︎

Vector GetMovementVector ( )⚓︎


Get·Multi·Shot·Params ()⚓︎

MultiShotParams GetMultiShotParams ( WeaponType WeaponType = WeaponType.WEAPON_TEARS )⚓︎

Bug

Since it returns UserData which cant be edited directly, the return value of this function can only be used in combination with the GetMultiShotPositionVelocity() function.


Get·Multi·Shot·Position·Velocity ()⚓︎

PosVel GetMultiShotPositionVelocity ( int LoopIndex, WeaponType Weapon, Vector ShotDirection, float ShotSpeed, MultiShotParams params )⚓︎

Call this function in a loop, where the LoopIndex is a number between 0 and the amount of tears the current MultiShotParams contains. Since MultiShotParams is currently not accessable via the modding api, you need to find other ways to get the amount.


Get·Name ()⚓︎

string GetName ( )⚓︎

Returns the name of the player. (Isaac, Cain, Azazel,...)


Get·NPCTarget ()⚓︎

Entity GetNPCTarget ( )⚓︎

Normally, this function returns the player. However, in some cases, NPCs can be redirected to attack another target, in which case this function will return the alternate target (e.g. after using Best Friend).


Get·Num·Blue·Flies ()⚓︎

int GetNumBlueFlies ( )⚓︎


Get·Num·Blue·Spiders ()⚓︎

int GetNumBlueSpiders ( )⚓︎


Get·Num·Bombs ()⚓︎

int GetNumBombs ( )⚓︎


Get·Num·Coins ()⚓︎

int GetNumCoins ( )⚓︎


Get·Num·Giga·Bombs ()⚓︎

int GetNumGigaBombs ( )⚓︎


Get·Num·Keys ()⚓︎

int GetNumKeys ( )⚓︎


Get·Other·Twin ()⚓︎

EntityPlayer GetOtherTwin ( )⚓︎

Returns the other player of pair characters or the other form of characters with multiple forms.

  • When called on Jacob, returns Esau.
  • When called on Esau, returns Jacob.
  • When called on Tainted Forgotten, returns Tainted Forgotten's Soul.
  • When called on Tainted Forgotten's Soul, returns Tainted Forgotten.
  • When called on Tainted Lazarus, it will only return the Flip Lazarus, if the player has the Birthright item. Otherwise it returns nil.
  • When called on any other character, returns nil.

Get·Pill ()⚓︎

PillColor GetPill ( int SlotId )⚓︎

Gets the ID of the pill the player is holding in the given itemslot (0 = Main slot, 1 = secondary slot, 2 or 3) Returns 0 when no pill is held in the given slot.


Get·Pill·RNG ()⚓︎

RNG GetPillRNG ( PillEffect ID )⚓︎


Get·Player·Type ()⚓︎

PlayerType GetPlayerType ( )⚓︎


Get·Pocket·Item ()⚓︎

const PlayerPocketItem GetPocketItem ( int SlotId )⚓︎

Get the userdata of the pocketitem (Card,Pill,rune) in a said slot.

Bugs

This function returns userdata, which can't be processed. It is therefore broken and should not be used!


Get·Poop·Mana ()⚓︎

int GetPoopMana ( )⚓︎

Returns how many poop consumables the player is currently holding


Get·Poop·Spell ()⚓︎

PoopSpellType GetPoopSpell ( int Position )⚓︎

Returns the poop spell at the given position in the player's spell queue


Get·Recent·Movement·Vector ()⚓︎

const Vector GetRecentMovementVector ( )⚓︎

Returns the joystick direction that drives player movement, taking into account certain modifiers like disabled controls and seed effects.


Get·Rotten·Hearts ()⚓︎

int GetRottenHearts ( )⚓︎


Get·Shooting·Input ()⚓︎

Vector GetShootingInput ( )⚓︎

Returns a vector that corresponds to the shooting inputs that this player is pressing.

Shooting Angle diagram

GetShootingInput diagram


Get·Shooting·Joystick ()⚓︎

Vector GetShootingJoystick ( )⚓︎

Returns a vector that corresponds to the shooting inputs that this player is holding.

See the image for the GetShootingInput method.


Get·Smooth·Body·Rotation ()⚓︎

float GetSmoothBodyRotation ( )⚓︎


Get·Soul·Charge ()⚓︎

int GetSoulCharge ( )⚓︎


Get·Soul·Hearts ()⚓︎

int GetSoulHearts ( )⚓︎

Returns the amount of Soul Hearts the player has. 1 unit is half a heart.

Notes

Black Hearts count toward this total, as the game sees them as soul hearts.


Get·Sub·Player ()⚓︎

EntityPlayer GetSubPlayer ( )⚓︎

Returns the other form of The Forgotten.


Get·Tear·Hit·Params ()⚓︎

TearParams GetTearHitParams ( WeaponType WeaponType, float DamageScale = 1, int TearDisplacement = 1, Entity Source = nil )⚓︎

Used for tear parameters that are calculated on hit (ex: Tough love, Common cold), DamageScale is used for scale calculation based on damage


Get·Tear·Movement·Inheritance ()⚓︎

Vector GetTearMovementInheritance ( Vector ShotDirection )⚓︎


Get·Tear·Poison·Damage ()⚓︎

float GetTearPoisonDamage ( )⚓︎


Get·Tear·Range·Modifier ()⚓︎

int GetTearRangeModifier ( )⚓︎


Get·Total·Damage·Taken ()⚓︎

int GetTotalDamageTaken ( )⚓︎


Get·Tractor·Beam ()⚓︎

Entity GetTractorBeam ( )⚓︎


Get·Trinket ()⚓︎

TrinketType GetTrinket ( int TrinketIndex )⚓︎

Gets the ID of the trinket the player is holding in the given trinketslot (0 or 1). Returns 0 when no trinket is held in the given slot.


Get·Trinket·Multiplier ()⚓︎

int GetTrinketMultiplier ( TrinketType TrinketID )⚓︎

Gets the multiplier of a given Trinket effect. This is analog to the number of times the trinket effect is applied.

Multiplier Breakdown
  • Per normal trinket of this type equipped / gulped : +1
  • Per golden trinket of this type equipped / gulped : +2
  • Mom's Box equipped : +1 (does not stack)

Get·Trinket·RNG ()⚓︎

RNG GetTrinketRNG ( TrinketType TrinketID )⚓︎


Get·Velocity·Before·Update ()⚓︎

const Vector GetVelocityBeforeUpdate ( )⚓︎


Get·Zodiac·Effect ()⚓︎

CollectibleType GetZodiacEffect ( )⚓︎


Has·Collectible ()⚓︎

boolean HasCollectible ( CollectibleType Type, boolean IgnoreModifiers = false )⚓︎

IgnoreModifiers: If set to true, only counts collectibles the player actually owns and ignores effects granted by items like Zodiac, 3 Dollar Bill and Lemegeton


Has·Curse·Mist·Effect ()⚓︎

boolean HasCurseMistEffect ( )⚓︎


Has·Full·Hearts ()⚓︎

boolean HasFullHearts ( )⚓︎


Has·Full·Hearts·And·Soul·Hearts ()⚓︎

boolean HasFullHeartsAndSoulHearts ( )⚓︎


Has·Golden·Bomb ()⚓︎

boolean HasGoldenBomb ( )⚓︎


Has·Golden·Key ()⚓︎

boolean HasGoldenKey ( )⚓︎


Has·Invincibility ()⚓︎

boolean HasInvincibility ( DamageFlag Flags = 0 )⚓︎

returns true when player is in an invincibility state


Has·Player·Form ()⚓︎

boolean HasPlayerForm ( PlayerForm Form )⚓︎


Has·Timed·Item ()⚓︎

boolean HasTimedItem ( )⚓︎

Kept for avoiding modding issues.


Has·Trinket ()⚓︎

boolean HasTrinket ( TrinketType Type, boolean IgnoreModifiers = false )⚓︎

IgnoreModifiers: If set to true, only counts trinkets the player actually holds and ignores effects granted by other items


Has·Weapon·Type ()⚓︎

boolean HasWeaponType ( WeaponType WeaponType )⚓︎


Init·Baby·Skin ()⚓︎

void InitBabySkin ( )⚓︎


Is·Black·Heart ()⚓︎

boolean IsBlackHeart ( int Heart )⚓︎


Is·Bone·Heart ()⚓︎

boolean IsBoneHeart ( int heart )⚓︎


Is·Coop·Ghost ()⚓︎

boolean IsCoopGhost ( )⚓︎

In a multiplayer game, if a player dies, they will return as a tiny ghost. This method returns true if the player is a co-op ghost.


Is·Extra·Animation·Finished ()⚓︎

boolean IsExtraAnimationFinished ( )⚓︎


Is·Full·Sprite·Rendering ()⚓︎

boolean IsFullSpriteRendering ( )⚓︎


Is·Held·Item·Visible ()⚓︎

boolean IsHeldItemVisible ( )⚓︎


Is·Holding·Item ()⚓︎

boolean IsHoldingItem ( )⚓︎

Is Player holding up an item (card/collectible/etc)


Is·Item·Queue·Empty ()⚓︎

boolean IsItemQueueEmpty ( )⚓︎


Is·P2Appearing ()⚓︎

boolean IsP2Appearing ( )⚓︎


Is·Pos·In·Spot·Light ()⚓︎

boolean IsPosInSpotLight ( Vector Position )⚓︎


Is·Sub·Player ()⚓︎

boolean IsSubPlayer ( )⚓︎

Returns true if the player object was returned from the EntityPlayer.GetSubPlayer method. (This method is not related to multiplayer.)

Additionally, this also returns true for the player object representing Dead Tainted Lazarus that fires at the beginning of the run in the PostPlayerInit callback. (The PostPlayerInit callback fires first for Dead Tainted Lazarus before firing for the normal Tainted Lazarus.)


Needs·Charge ()⚓︎

boolean NeedsCharge ( ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎

This will always return false for active items that have chargetype="special" set in the items.xml file, even if they are not fully charged.


Play·Extra·Animation ()⚓︎

void PlayExtraAnimation ( string Animation )⚓︎


Queue·Extra·Animation ()⚓︎

void QueueExtraAnimation ( string Animation )⚓︎


Queue·Item ()⚓︎

void QueueItem ( ItemConfigItem Item, int Charge = 0, boolean Touched = false, boolean Golden = false, int VarData = 0 )⚓︎

When the player touches a collectible or trinket, they are not granted it immediately. Instead, the item is queued for the duration of the animation where the player holds the item above their head. When the animation is finished, the item in the queue will be granted. This method adds a new item to the item queue. If the player is not currently playing an animation, then the queued item will simply be awarded instantly.

Also see FlushQueueItem(), IsItemQueueEmpty(), and QueuedItem.


Remove·Black·Heart ()⚓︎

void RemoveBlackHeart ( int BlackHeart )⚓︎


Remove·Blue·Fly ()⚓︎

void RemoveBlueFly ( )⚓︎


Remove·Blue·Spider ()⚓︎

void RemoveBlueSpider ( )⚓︎


Remove·Collectible ()⚓︎

void RemoveCollectible ( CollectibleType Type, boolean IgnoreModifiers = false, ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY, boolean RemoveFromPlayerForm = true )⚓︎

IgnoreModifiers: Ignores collectible effects granted by other items (i.e. Void)

Slot: Sets the active slot this collectible should be removed from

RemoveFromPlayerForm: If successfully removed and part of a transformation, decrease that transformation's counter by 1


Remove·Costume ()⚓︎

void RemoveCostume ( ItemConfigItem Item )⚓︎

Removes a given costume based on its item config entry.

Example code

This code removes the costume of the Spoon Bender collectible.

1
2
3
4
local player = Isaac.GetPlayer()
local itemConfig = Isaac.GetItemConfig()
local itemConfigItem = itemConfig:GetCollectible(CollectibleType.COLLECTIBLE_SPOON_BENDER)
player:RemoveCostume(itemConfigItem)


Remove·Curse·Mist·Effect ()⚓︎

void RemoveCurseMistEffect ( )⚓︎


Remove·Golden·Bomb ()⚓︎

void RemoveGoldenBomb ( )⚓︎


Remove·Golden·Key ()⚓︎

void RemoveGoldenKey ( )⚓︎


Remove·Skin·Costume ()⚓︎

void RemoveSkinCostume ( )⚓︎

Removes player-specific costumes like Magdalene's hair or Cain's eyepatch.


Render·Body ()⚓︎

void RenderBody ( Vector position )⚓︎


Render·Glow ()⚓︎

void RenderGlow ( Vector position )⚓︎


Render·Head ()⚓︎

void RenderHead ( Vector position )⚓︎


Render·Top ()⚓︎

void RenderTop ( Vector position )⚓︎


Replace·Costume·Sprite ()⚓︎

void ReplaceCostumeSprite ( ItemConfigItem Item, string SpritePath, int SpriteId )⚓︎


Reset·Damage·Cooldown ()⚓︎

void ResetDamageCooldown ( )⚓︎


Reset·Item·State ()⚓︎

void ResetItemState ( )⚓︎

Room transitions call this to prevent lock ups.


Respawn·Familiars ()⚓︎

void RespawnFamiliars ( )⚓︎

Respawns all familiars associated to the player.


Revive ()⚓︎

void Revive ( )⚓︎

Revives the player.

Bugs

Exiting the run at any point after this function is called will make it so that the run can't be continued.


Set·Active·Charge ()⚓︎

void SetActiveCharge ( int Charge, ActiveSlot ActiveSlot = ActiveSlot.SLOT_PRIMARY )⚓︎


Set·Blood·Charge ()⚓︎

void SetBloodCharge ( int Amount )⚓︎

Only works on Tainted Bethany.


Set·Card ()⚓︎

void SetCard ( int SlotId, Card ID )⚓︎

Change the card/rune the player is holding in the given itemslot (0 or 1).


Set·Full·Hearts ()⚓︎

void SetFullHearts ( )⚓︎


Set·Min·Damage·Cooldown ()⚓︎

void SetMinDamageCooldown ( int DamageCooldown )⚓︎


Set·Pill ()⚓︎

void SetPill ( int SlotId, PillColor Pill )⚓︎

Change the pill the player is holding in the given itemslot (0 or 1).


Set·Pocket·Active·Item()⚓︎

void SetPocketActiveItem ( CollectibleType Type, ActiveSlot Slot, boolean KeepInPools )⚓︎

Sets the player's pocket active item to the given active item. Slot can be either SLOT_POCKET or SLOT_POCKET2. Items added to SLOT_POCKET2 will always be removed upon being used. If KeepInPools is set to true, the item will not be removed from the item pools. Use this to let the player start with a custom active item in their pocket active slot right away.


Set·Shooting·Cooldown ()⚓︎

void SetShootingCooldown ( int Cooldown )⚓︎


Set·Soul·Charge ()⚓︎

void SetSoulCharge ( int Amount )⚓︎

Only works on Bethany.


Set·Target·Trap·Door ()⚓︎

void SetTargetTrapDoor ( GridEntity TrapDoor )⚓︎

This function got removed with Repentance.


Shoot·Red·Candle ()⚓︎

void ShootRedCandle ( Vector Direction )⚓︎

for ghost pepper item + poop and farts


Spawn·Maw·Of·Void ()⚓︎

EntityLaser SpawnMawOfVoid ( int Timeout )⚓︎


Stop·Extra·Animation ()⚓︎

void StopExtraAnimation ( )⚓︎


Swap·Active·Items ()⚓︎

void SwapActiveItems ( )⚓︎


Throw·Blue·Spider ()⚓︎

Entity ThrowBlueSpider ( Vector Position, Vector Target )⚓︎


Throw·Friendly·Dip ()⚓︎

EntityFamiliar ThrowFriendlyDip ( int Subtype, Vector Position, Vector Target = Vector.Zero )⚓︎

Dip Subtypes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
0: normal
1: red
2: corny
3: golden
4: rainbow
5: black
6: holy
12: stone
13: flaming
14: poison
20: brownie

Throw·Held·Entity ()⚓︎

Entity ThrowHeldEntity ( Vector Velocity )⚓︎


Trigger·Book·Of·Virtues ()⚓︎

void TriggerBookOfVirtues ( CollectibleType Type = CollectibleType.COLLECTIBLE_NULL, int Charge = 0 )⚓︎


Try·Hold·Entity ()⚓︎

boolean TryHoldEntity ( Entity Entity )⚓︎


Try·Hold·Trinket ()⚓︎

boolean TryHoldTrinket ( TrinketType Type )⚓︎

Returns true if an active item pickup cooldown is over. returns true if trinket can be added, else false


Try·Remove·Collectible·Costume ()⚓︎

void TryRemoveCollectibleCostume ( CollectibleType Collectible, boolean KeepPersistent )⚓︎

Tries to remove a costume of the given collectible. KeepPersistent is used to define if persistent costumes should be removed. If its set to false, it will only remove temporary costumes.

Example code

This code removes the costume of the Spoon Bender collectible.

1
2
local player = Isaac.GetPlayer()
player:TryRemoveCollectibleCostume(CollectibleType.COLLECTIBLE_SPOON_BENDER, false)


Try·Remove·Null·Costume ()⚓︎

void TryRemoveNullCostume ( NullItemID NullId )⚓︎


Try·Remove·Trinket ()⚓︎

boolean TryRemoveTrinket ( TrinketType Type )⚓︎


Try·Remove·Trinket·Costume ()⚓︎

void TryRemoveTrinketCostume ( TrinketType Trinket )⚓︎

Tries to remove a trinket costume


Try·Use·Key ()⚓︎

boolean TryUseKey ( )⚓︎


Update·Can·Shoot ()⚓︎

void UpdateCanShoot ( )⚓︎


Use·Active·Item ()⚓︎

void UseActiveItem ( CollectibleType Item, UseFlags UseFlags = 0, ActiveSlot Slot = -1, int CustomVarData = 0 )⚓︎

void UseActiveItem ( CollectibleType Item, boolean ShowAnim = false, boolean KeepActiveItem = false, boolean AllowNonMainPlayer = true, boolean ToAddCostume = false, ActiveSlot Slot = -1, int CustomVarData = 0 )⚓︎

Slot: The active slot this item was used from (set to -1 if this item wasn't triggered by any active slot)

Notes

This method will increment the number of CollectibleEffects (see Temporary Effects) of the passed item by 1 for the current room, and will trigger any associated MC_USE_ITEM callbacks. As of Repentance, this method can also be used on Passive and Familiar ItemTypes.


Use·Card ()⚓︎

void UseCard ( Card ID, UseFlags UseFlags = 0 )⚓︎


Use·Pill ()⚓︎

void UsePill ( PillEffect ID, PillColor PillColor, UseFlags UseFlags = 0 )⚓︎


Use·Poop·Spell ()⚓︎

void UsePoopSpell ( PoopSpellType type )⚓︎

Triggers one of Tainted ???'s poop spells (see PoopSpellType enum)


Will·Player·Revive ()⚓︎

boolean WillPlayerRevive ( )⚓︎

This function will return true if the player has one or more extra lives or if a conditional revival item will work on the next death.

Right now, there are 3 items that grant conditional extra lives:

  • Guppy's Collar - This function will successfully predict whether or not the next revive from Guppy's Collar will work or not. (50% chance)
  • Broken Ankh - This function will successfully predict whether or not the next revive from Broken Ankh will work or not. (22.22% chance)
  • Mysterious Paper - This function will only successfully predict the revive from Missing Poster every 4 frames, because it evaluates only one of its 4 possible item effects each frame.

Variables⚓︎

Baby·Skin⚓︎

BabySubType BabySkin⚓︎

P2 Skin section Used to hold the selected skin (in case of glitched baby it will pick a random one)

Bugs

This variable actually contains userdata and is not usable within API. Attempt to change it will results in a crash.


Can·Fly⚓︎

boolean CanFly⚓︎

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Can the player fly over rocks and pits?


Controller·Index⚓︎

const int ControllerIndex⚓︎


Controls·Cooldown⚓︎

int ControlsCooldown⚓︎


Controls·Enabled⚓︎

boolean ControlsEnabled⚓︎


Damage⚓︎

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?


Fire·Delay⚓︎

float FireDelay⚓︎

How long until the player can spawn their next tear?

Version Difference

In the Afterbirth+ version of the modding api, this variable is an integer


Friend·Ball·Enemy⚓︎

const EntityDesc FriendBallEnemy⚓︎

Bugs

This function returns userdata that cant be edited or accessed.


Head·Frame·Delay⚓︎

int HeadFrameDelay⚓︎


IBS·Charge⚓︎

float IBSCharge⚓︎

Internally used by IBS, increases based on damage dealt, range is 0-1


Item·Hold·Cooldown⚓︎

int ItemHoldCooldown⚓︎

Used for avoiding player get stucked between rocks when switching a flying item with other active item.


Laser·Color⚓︎

Color LaserColor⚓︎


Luck⚓︎

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.


Max·Fire·Delay⚓︎

float 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?

Version Difference

In the Afterbirth+ version of the modding api, this variable is an integer


Move·Speed⚓︎

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?


Queued·Item⚓︎

QueueItemData QueuedItem⚓︎

  • When Isaac picks up a collectible or a trinket, he holds it above his head for a while. At this point, the collectible/trinket is not actually put into his inventory yet.
  • In other words, the item is queued for insertion until the animation completes, at which point the queue is processed and the item is inserted.
  • QueuedItem holds a object of type QueueItemData that describes the item that a player is currently holding above their head.
  • QueuedItem is never nil, even if the player is not currently holding up any item. (However, player.QueuedItem.Item will be nil if they are not currently holding up any item.)
  • This only stores data for collectibles and trinkets. It does not store any data for pocket items (even though Isaac plays a similar "holding above head" animation for pocket items).
  • Also see FlushQueueItem(), IsItemQueueEmpty(), and QueueItem().

Samson·Berserk·Charge⚓︎

int SamsonBerserkCharge⚓︎

Internally used by Tainted Samson, increases based on damage dealt, range is 0-100000


Secondary·Active·Item⚓︎

ActiveItemDesc SecondaryActiveItem⚓︎

Bug

This function does not exist anymore in Repentance. As of right now, there is no other function to get the ActiveItemDesc of any active item the player holds. Until this is fixed, this info will stay here.


Shot·Speed⚓︎

float ShotSpeed⚓︎

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the ShotSpeed Stat.

Defines how fast the tear travel when spawned.

The default velocity of a tear shot is 10 times the players ShotSpeed.


Tear·Color⚓︎

Color TearColor⚓︎


Tear·Falling·Acceleration⚓︎

float TearFallingAcceleration⚓︎


Tear·Falling·Speed⚓︎

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.


Tear·Flags⚓︎

TearFlags TearFlags⚓︎

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Various TearFlags.

Example Code

This code makes Isaac's tears spectral.

1
2
3
4
5
local mod:OnEvaluateTearFlags(player, flag)
    player.TearFlags = player.TearFlags | TearFlags.TEAR_SPECTRAL
end

mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, mod.OnEvaluateTearFlags, CacheFlag.CACHE_TEARFLAG)


Tear·Height⚓︎

float TearHeight⚓︎

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How high above the ground is the tear when it spawns?

Example Code

This code gives Isaac a +5 range up.

1
2
3
4
5
6
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)

Tear·Range⚓︎

float TearRange⚓︎

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How far should a tear go when it spawns?


Tears·Offset⚓︎

Vector TearsOffset⚓︎


Last update: February 6, 2023