Binding of Isaac - Afterbirth+ Lua Reference/Guide
|
Public Member Functions |
|
Backdrop::Backdrop | GetBackdropType () |
Update () | |
Render () | |
boolean | IsInitialized () |
GridCollisionClass | GetGridCollision (integer GridIndex) |
GridCollisionClass | GetGridCollisionAtPos (Vector Pos) |
GridEntityDoor & | GetDoor (DoorSlot Slot) |
Vector | GetDoorSlotPosition (DoorSlot Slot) |
boolean | IsDoorSlotAllowed (DoorSlot Slot) |
Returns whether this room design may have a door at a given position, disregarding whether those doors exist. More... |
|
RemoveDoor (DoorSlot Slot) | |
KeepDoorsClosed () | |
RoomType | GetType () |
integer | GetDecorationSeed () |
integer | GetSpawnSeed () |
integer | GetAwardSeed () |
RoomShape | GetRoomShape () |
RoomConfig::Stage | GetRoomConfigStage () |
returns the original stage the room was designed for (useful for The Void) More... |
|
integer | GetGridPath (integer Index) |
integer | GetGridPathFromPos (integer Index) |
boolean | SetGridPath (integer Index, integer Value) |
boolean | DamageGrid (integer Index, integer Damage) |
boolean | DestroyGrid (integer Index, boolean Immediate) |
boolean | CheckLine (Vector Pos1, Vector Pos2, LinecheckMode Mode, integer GridPathThreshold, boolean IgnoreWalls, boolean IgnoreCrushable) |
Vector | GetLaserTarget (Vector Pos, Vector Dir) |
GridEntity & | GetGridEntity (integer Index) |
GridEntity & | GetGridEntityFromPos (Vector Position) |
integer | GetGridWidth () |
integer | GetGridHeight () |
integer | GetGridSize () |
boolean | IsClear () |
SetClear (boolean Clear) | |
Vector | FindFreePickupSpawnPosition (Vector Pos, float InitialStep, boolean AvoidActiveEntities) |
Vector | FindFreeTilePosition (Vector Pos, float DistanceThreshold) |
integer | GetGridIndex (Vector Position) |
integer | GetClampedGridIndex (Vector Position) |
Vector | GetGridPosition (integer GridIndex) |
Vector | GetClampedPosition (Vector Pos, float Margin) |
boolean | IsPositionInRoom (Vector Pos, float Margin) |
Vector | ScreenWrapPosition (Vector Pos, float Margin) |
boolean | IsLShapedRoom () |
LRoomAreaDesc | GetLRoomAreaDesc () |
LRoomTileDesc | GetLRoomTileDesc () |
Vector | GetTopLeftPos () |
Vector | GetBottomRightPos () |
Vector | GetCenterPos () |
boolean | SpawnGridEntity (integer GridIndex, GridEntityType Type, integer Variant, integer Seed, integer VarData) |
RemoveGridEntity (integer GridIndex, integer PathTrail, boolean KeepDecoration) | |
integer | GetFrameCount () |
EntityList & | GetEntities () |
integer | GetAliveEnemiesCount () |
integer | GetAliveBossesCount () |
BossId | GetBossID () |
BossId | GetSecondBossID () |
TryPlaceLadder (Vector PlayerPos, Vector PlayerVelocity, Entity Ladder) | |
SetSacrificeDone (boolean Done) | |
boolean | IsSacrificeDone () |
boolean | IsAmbushDone () |
SetAmbushDone (boolean Value) | |
boolean | IsAmbushActive () |
ShopRestockPartial () | |
ShopRestockFull () | |
ShopReshuffle (boolean KeepCollectibleIdx, boolean ReselectSaleItem) | |
boolean | TrySpawnDevilRoomDoor (boolean Animate) |
float | GetDevilRoomChance () |
boolean | TrySpawnBossRushDoor (boolean IgnoreTime) |
boolean | TrySpawnMegaSatanRoomDoor () |
boolean | TrySpawnBlueWombDoor (boolean FirstTime, boolean IgnoreTime) |
boolean | TrySpawnTheVoidDoor () |
PlayMusic () | |
SetRedHeartDamage () | |
boolean | GetRedHeartDamage () |
integer | GetBrokenWatchState () |
SetBrokenWatchState (integer State) | |
boolean | IsFirstVisit () |
Broken Watch Room State - 0 = no watch effect, 1 = speed down, 2 = speed up. More... |
|
const Vector & | GetRenderSurfaceTopLeft () |
The position the floor and wall textures will be rendered at. More... |
|
const Vector & | GetRenderScrollOffset () |
The camera scroll offset and screen shake offsets are both represented here. More... |
|
boolean | HasWaterPits () |
CollectibleType | GetSeededCollectible (integer Seed) |
integer | GetShopLevel () |
SetShockwaveParam (integer ShockwaveId, ShockwaveParams Params) | |
integer | GetNextShockwaveId () |
SetCardAgainstHumanity () | |
EmitBloodFromWalls (integer Duration, integer Count) | |
SpawnClearAward () | |
float | GetLightingAlpha () |
boolean | TryMakeBridge (GridEntity pit) |
integer | GetDungeonRockIdx () |
integer | GetTintedRockIdx () |
boolean | HasSlowDown () |
SetSlowDown (integer Duration) | |
Vector | GetRandomPosition (float Margin) |
returns random non tile aligned position More... |
|
integer | GetRandomTileIndex (integer Seed) |
RespawnEnemies () | |
for D7 collectible More... |
|
boolean | HasWater () |
boolean | HasTriggerPressurePlates () |
boolean | IsCurrentRoomLastBoss () |
boolean | IsFirstEnemyDead () |
SetFirstEnemyDead (boolean Value) | |
MamaMegaExplossion () | |
integer | GetDeliriumDistance () |
TurnGold () | |
SetFloorColor (Color FloorColor) | |
SetWallColor (Color WallColor) | |
Vector | WorldToScreenPosition (Vector WorldPos) |
Converts an entity position to one that can be used to render to the screen. More... |
|
boolean Room::CheckLine | ( | Vector | Pos1, |
Vector | Pos2, | ||
LinecheckMode | Mode, | ||
integer | GridPathThreshold, | ||
boolean | IgnoreWalls, | ||
boolean | IgnoreCrushable | ||
) |
returns true if there is a direct line of sight between Pos1 and Pos2 returns false if the line is obstructed
LinecheckModes:
0 : makes the line check collide with anything that impedes ground movement
1 : is a cheaper version of 0, but is not as reliable
2 : is used for explosions, it only collides with walls and indestructible blocks
3 : is a line check that only collides with obstacles that can block projectiles
boolean Room::DamageGrid | ( | integer | Index, |
integer | Damage | ||
) |
Damage Grid Entities currently this concerns GridEntityPoop and GridEntity_Fire returns true if damageable entity was found (and possibly damaged) return false if not used by tears, bombs, some NPCs, etc
boolean Room::DestroyGrid | ( | integer | Index, |
boolean | Immediate | ||
) |
calls DamageGrid internally to damage Poop/Fire removes rocks and opens secret doors returns true if something was destroyed returns false if not used for explosions mostly
Room::EmitBloodFromWalls | ( | integer | Duration, |
integer | Count | ||
) |
Vector Room::FindFreePickupSpawnPosition | ( | Vector | Pos, |
float | InitialStep, | ||
boolean | AvoidActiveEntities | ||
) |
Starting from Pos, will try to find a free spawn position where a newly spawned pickup item will not collide with already spawned pickup items, or solid grid elements such as rocks, or pits The returned position will be aligned to the grid. If no free position is found, the original position (aligned to the grid) is returned.
Finds the nearest free tile based on position Stops immediately if the tile sampled has a squared distance less than DistanceThresholdSQ
integer Room::GetAliveBossesCount | ( | ) |
integer Room::GetAliveEnemiesCount | ( | ) |
integer Room::GetAwardSeed | ( | ) |
Backdrop::Backdrop Room::GetBackdropType | ( | ) |
Returns the BackdropType (Background) of the current room.
BackdropTypes
ID | Backdrop | ID | Backdrop | |
---|---|---|---|---|
1 | Basement | 15 | Cathedral | |
2 | Cellar | 16 | Dark Room | |
3 | Burning Basement | 17 | Chest | |
4 | Caves | 18 | Mega Satan | |
5 | Catacombs | 19 | Library | |
6 | Drowned Caves | 20 | Shop | |
7 | Depths | 21 | Isaacs Room | |
8 | Necropolis | 22 | Barren Room | |
9 | Dank Depths | 23 | Secret Room | |
10 | Womb | 24 | Dice Room | |
11 | Utero | 25 | Arcade | |
12 | Scarred Womb | 26 | Error Room | |
13 | Blue Womb (Hush) | 27 | Blue Secret | |
14 | Sheol | 28 | Ultra Greed Shop |
BossId Room::GetBossID | ( | ) |
This will return the subtype of the current room, since this value is used to determine the boss-portrait to display when entering.
Vector Room::GetBottomRightPos | ( | ) |
returns bottom right position inside of walls
integer Room::GetBrokenWatchState | ( | ) |
Vector Room::GetCenterPos | ( | ) |
returns the room center position
integer Room::GetClampedGridIndex | ( | Vector | Position | ) |
converts float position (x,y) to grid index (similar to ingrid) clamps the values if out of bounds
returns Pos clamped to room borders inside of walls
integer Room::GetDecorationSeed | ( | ) |
integer Room::GetDeliriumDistance | ( | ) |
float Room::GetDevilRoomChance | ( | ) |
GridEntityDoor& Room::GetDoor | ( | DoorSlot | Slot | ) |
integer Room::GetDungeonRockIdx | ( | ) |
EntityList& Room::GetEntities | ( | ) |
integer Room::GetFrameCount | ( | ) |
GridCollisionClass Room::GetGridCollision | ( | integer | GridIndex | ) |
Returns the GridCollisionClass of the grid entity at this grid index.
GridCollisionClass Room::GetGridCollisionAtPos | ( | Vector | Pos | ) |
Returns the GridCollisionClass of the grid entity at this position in the room.
GridEntity& Room::GetGridEntity | ( | integer | Index | ) |
Returns the GridEntity at this grid index.
GridEntity& Room::GetGridEntityFromPos | ( | Vector | Position | ) |
Returns the GridEntity at this position in the room.
integer Room::GetGridHeight | ( | ) |
integer Room::GetGridIndex | ( | Vector | Position | ) |
converts float position (x,y) to grid index returns -1 for invalid index
integer Room::GetGridPath | ( | integer | Index | ) |
integer Room::GetGridPathFromPos | ( | integer | Index | ) |
Vector Room::GetGridPosition | ( | integer | GridIndex | ) |
converts grid index to float (x,y) position undefined behaviour for invalid index
integer Room::GetGridSize | ( | ) |
integer Room::GetGridWidth | ( | ) |
returns the hit position for a laser beam (Technology, Robo-Baby) usually, the first poop, fire, rock, TNT, or wall encountered on a straight line
float Room::GetLightingAlpha | ( | ) |
LRoomAreaDesc Room::GetLRoomAreaDesc | ( | ) |
LRoomTileDesc Room::GetLRoomTileDesc | ( | ) |
integer Room::GetNextShockwaveId | ( | ) |
Vector Room::GetRandomPosition | ( | float | Margin | ) |
returns random non tile aligned position
integer Room::GetRandomTileIndex | ( | integer | Seed | ) |
boolean Room::GetRedHeartDamage | ( | ) |
const Vector& Room::GetRenderScrollOffset | ( | ) |
The camera scroll offset and screen shake offsets are both represented here.
const Vector& Room::GetRenderSurfaceTopLeft | ( | ) |
The position the floor and wall textures will be rendered at.
RoomConfig::Stage Room::GetRoomConfigStage | ( | ) |
returns the original stage the room was designed for (useful for The Void)
RoomShape Room::GetRoomShape | ( | ) |
BossId Room::GetSecondBossID | ( | ) |
CollectibleType Room::GetSeededCollectible | ( | integer | Seed | ) |
integer Room::GetShopLevel | ( | ) |
integer Room::GetSpawnSeed | ( | ) |
integer Room::GetTintedRockIdx | ( | ) |
Vector Room::GetTopLeftPos | ( | ) |
returns top left position inside of walls
RoomType Room::GetType | ( | ) |
boolean Room::HasSlowDown | ( | ) |
boolean Room::HasTriggerPressurePlates | ( | ) |
boolean Room::HasWater | ( | ) |
boolean Room::HasWaterPits | ( | ) |
boolean Room::IsAmbushActive | ( | ) |
boolean Room::IsAmbushDone | ( | ) |
boolean Room::IsClear | ( | ) |
boolean Room::IsCurrentRoomLastBoss | ( | ) |
boolean Room::IsDoorSlotAllowed | ( | DoorSlot | Slot | ) |
Returns whether this room design may have a door at a given position, disregarding whether those doors exist.
boolean Room::IsFirstEnemyDead | ( | ) |
boolean Room::IsFirstVisit | ( | ) |
Broken Watch Room State - 0 = no watch effect, 1 = speed down, 2 = speed up.
boolean Room::IsInitialized | ( | ) |
boolean Room::IsLShapedRoom | ( | ) |
boolean Room::IsPositionInRoom | ( | Vector | Pos, |
float | Margin | ||
) |
boolean Room::IsSacrificeDone | ( | ) |
Room::KeepDoorsClosed | ( | ) |
Room::MamaMegaExplossion | ( | ) |
Room::PlayMusic | ( | ) |
Room::RemoveDoor | ( | DoorSlot | Slot | ) |
Room::RemoveGridEntity | ( | integer | GridIndex, |
integer | PathTrail, | ||
boolean | KeepDecoration | ||
) |
Room::Render | ( | ) |
Room::RespawnEnemies | ( | ) |
for D7 collectible
Returns Pos, screen-wrapped (if it is just outside the room on the right it will be moved to the left side of the room, etc)
This only wraps the point once, so if it has crossed multiple wrapping planes it will only wrap on the one it's closest to. For wrapping a position that has crossed two planes (outside a room in the top left for instance) call this function iteratively.
Room::SetAmbushDone | ( | boolean | Value | ) |
Room::SetBrokenWatchState | ( | integer | State | ) |
Room::SetCardAgainstHumanity | ( | ) |
Room::SetClear | ( | boolean | Clear | ) |
Needed for angel room, so the clear flag can be set to false when the angel spawns void SetClear(bool Clear) {m_Desc->Clear = Clear;}
Room::SetFirstEnemyDead | ( | boolean | Value | ) |
Room::SetFloorColor | ( | Color | FloorColor | ) |
Allows you to apply a color modifier to the floor texture of the current room.
Game():GetRoom():SetFloorColor(Color(1,1,1,1,255,0,0))
boolean Room::SetGridPath | ( | integer | Index, |
integer | Value | ||
) |
Room::SetRedHeartDamage | ( | ) |
Room::SetSacrificeDone | ( | boolean | Done | ) |
Room::SetShockwaveParam | ( | integer | ShockwaveId, |
ShockwaveParams | Params | ||
) |
Room::SetSlowDown | ( | integer | Duration | ) |
Room::SetWallColor | ( | Color | WallColor | ) |
Allows you to apply a color modifier to the wall texture of the current room.
Game():GetRoom():SetWallColor(Color(1,1,1,1,255,0,0))
Room::ShopReshuffle | ( | boolean | KeepCollectibleIdx, |
boolean | ReselectSaleItem | ||
) |
Room::ShopRestockFull | ( | ) |
Room::ShopRestockPartial | ( | ) |
Room::SpawnClearAward | ( | ) |
boolean Room::SpawnGridEntity | ( | integer | GridIndex, |
GridEntityType | Type, | ||
integer | Variant, | ||
integer | Seed, | ||
integer | VarData | ||
) |
boolean Room::TryMakeBridge | ( | GridEntity | pit | ) |
boolean Room::TrySpawnBlueWombDoor | ( | boolean | FirstTime, |
boolean | IgnoreTime | ||
) |
boolean Room::TrySpawnBossRushDoor | ( | boolean | IgnoreTime | ) |
boolean Room::TrySpawnDevilRoomDoor | ( | boolean | Animate | ) |
boolean Room::TrySpawnMegaSatanRoomDoor | ( | ) |
boolean Room::TrySpawnTheVoidDoor | ( | ) |
Room::TurnGold | ( | ) |
Room::Update | ( | ) |
Updates the current room.
Calling this function is NOT needed to apply changes!
This function is pretty useless