Class "Isaac"
Last updated
Was this helpful?
Last updated
Was this helpful?
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
returns pill color
{: .abp .tooltip .badge }
Prints a string into the Debug Console
???- example "Example Code" You can use this example as an alternative.
Returns the number of bosses in the current room.
Returns the number of enemies in the current room.
Returns the number of entities in the current room that fulfill the specified requirements. Spawner refers to an entity object (can be :::lua nil
) Type refers to the found entity's type (Can be :::lua EntityType.ENTITY_NULL
) Variant and Subtype refer to the found entitys Variant and Subtype (Can be :::lua -1
)
Prints a string into the log file. You can find this file here :::lua C:\Users\Jan\Documents\My Games\Binding of Isaac Afterbirth+\log.txt
???- example "Example Code" This code prints :::lua "This is a Test."
in the log.txt file.
Spawn an explosion on a specified location.
Returns entities based on Type, Variant, Subtype. If Variant and/or Subtype is -1 then everything is includedUse Cache flag for multiple calls per frame.
This function does not return the entities sorted by nearest first, but based on the order they were loaded.
Returns the CardID based on its hud value. (File: pocketitems.xml)
???- note "Notes" The name of this function is misleading, this function will only work with the hud value of a card and not the name of a card.
???- example "Example Code" This code gets the CardID of XVI - The Tower.
Returns the ID of a challenge the player is currently in. Returns 0 if the player is not playing any challenge.
Returns the ChallengeID of a challenge based on its name. (File: challenges.xml)
???- example "Example Code" This code gets the ChallengeID of Aprils fool.
Returns the CostumeID of a costume based on its file path. (File: costumes2.xml)
???- example "Example Code" This code gets the CostumeID of the Poop transformation costume.
Returns the CurseID of a curse based on its name. (File: curses.xml)
???- example "Example Code" This code gets the CurseID of Curse of the Unknown.
Returns the EntityType of an entity based on its name. (File: entities2.xml)
???- note "Notes" There is no SubType version of this function.
???- example "Example Code" This code gets the EntityType of Flaming Gaper.
Returns the variant of an entity based on its name. (File: entities2.xml)
???- note "Notes" There is no SubType version of this function.
???- example "Example Code" This code gets the variant of Flaming Gaper.
Returns the ItemID of a Collectible. (File: items.xml)
???- example "Example Code" This code gets the ItemID of Brimstone.
Returns the MusicID of a music track. (File: music.xml)
???- example "Example Code" This code gets the MusicID of the Title Screen.
Returns the PillEffectID based on its name. (File: pocketitems.xml)
???- example "Example Code" This code gets the PillEffectID of I can see forever!.
Returns the EntityPlayer which the user is controlling. 0 = Main player. Higher numbers refer to coop babies.
???- example "Example Code"
Returns the PlayerType of a character based on its name. (File: players.xml)
???- example "Example Code" This code gets the PlayerType of Azazel.
Returns a random position inside the current room. The Return value is a Vector containing the position in world coordinates.
Returns a table containing all entities in the room.
Returns the SoundEffectID of a sound based on its name. (File: sounds.xml)
???- example "Example Code" This code gets the SoundEffectID of a sound named "Custom Sound Effect"
Returns the width of the given string in pixels based on the "terminus8" font (same font as used in Isaac.RenderText())
Returns the current game time in milliseconds. This includes pauses!
Returns the TrinketType of a trinket based on its name. (File: items.xml)
???- example "Example Code" This code gets the TrinketType of Lucky Toe.
???+ bug "Bugs" forced has no effect and will NOT override the grid entity at the given location. Remove a grid entity at the given location if nessesary before spawning something again.
Returns "true" if your mod has Data stored using the "SaveModData()" function. Aka. if there is a "saveX.dat" file in your mod folder.There are 3 "saveX.dat" files, one per Savegame. They are stored in the mod's folder next to the "main.lua" file. The number indicates the savegame it corresponds to. The number will be determined automatically by the game.
Returns a JSON array/table that was stored in a "saveX.dat" file using the "SaveModData()" function. If there is no "saveX.dat" file in your mod, this function will return an empty string. There are 3 "saveX.dat" files, one per Savegame. They are stored in the mod's folder next to the "main.lua" file. The number indicates the savegame it corresponds to. The number will be determined automatically by the game.
???- example "Example Code" This code loads data stored in the "saveX.dat" file, if it exists.
Method to define a mod in the game. THIS NEEDS TO BE DEFINED IN EVERY MOD!
???- example "Example Code"
Deletes the stored "saveX.dat" file if it exists. There are 3 "saveX.dat" files, one per Savegame. They are stored in the mod's folder next to the "main.lua" file. The number indicates the savegame it corresponds to. The number will be determined automatically by the game.
Renders a scaled text on the Screen. X and Y coordinates need to be in screen coordinates ( x[0,~500) y [0,~350) ). ScaleX, ScaleY, R ,G ,B and A need to be between [0,1]. Some scale values can cause the font to display deformed and pixelated.
???- example "Example Code" This code renders the player position on the screen.
Renders a text with the default size on the Screen. X and Y coordinates need to be in screen coordinates ( x[0,~500) y [0,~350) ). R,G,B and A need to be between [0,1].
???- example "Example Code" This code renders the player position on the screen.
Stores a JSON array/table in a "saveX.dat" file. The stored Data persists thruout resets and game restart, so its perfect to store persistent data. There are 3 "saveX.dat" files, one per Savegame. They are stored in the mod's folder next to the "main.lua" file. The number indicates the savegame it corresponds to. The number will be determined automatically by the game.
???- example "Example Code" This code saves a table in the "saveX.dat" file.
Transfers Screen (aka. Window coordinates) into Worldcoordinates. This can be used to get a specific location in the room in World coordnates The World coordinate system is x[0,inf) y[0,inf).
???- example "Example Code" This code spawns a random collectible at in center of the current room.
Transfers world (aka. game coordinates) into Rendercoordinates. This can be used to render things at fixed positions in a room. The Render coordinate system is x[0,inf) y[0,inf). It defines the Position on the rendering-plane in the current room.
Transfers world (aka. game coordinates) into Screen (aka. Window) coordinates. This can be used to render things next to an entity. The Screen coordinate system is x[0,inf) y[0,inf). Normally, it goes till ~500x ~300y. The return vector contains integer values or numbers ending with .5
???- example "Example Code" This code render "test" at the position of the player. The text will move with isaac.
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
This function executes a debug console command. see the for informations on how to use commands.
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Returns entities in range of Radius from Position filtered by Partitions mask (see ) (include all = 0xffffffff)
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Returns the amount of frames the game as a whole is running. The counter increases even when the game is paused or when you are in the main menu! 1 second equals roughtly 60 frames. This function therefore works drastically different than :::lua Game():GetFrameCount()
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Returns the object.
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Spawn a at the given position (world coordinates).
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
Spawns the defined entity at the given location. If the position is not free, it spawns it in the nearest free position. There are two spawn functions. and . If you need to spawn something with a specific seed, then you use . If you need to spawn something with a randomly generated seed, then use . Most of the time, you will probably want to use .
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }