GridEntities

Overview

Return Value
Function

Functions

ConvertXMLGridEntityType()

{type : GridEntityType, variant : integer} ConvertXMLGridEntityType(GridEntityXMLType gridEntityXMLType, integer gridEntityXMLVariant)

Helper function to convert the grid entity type found in a room XML file to the corresponding grid entity type and variant normally used by the game. For example, a rock is represented as 1000.0 in a room XML file, but GridEntityType.GRID_ROCK is equal to 2.

GetCollidingEntitiesWithGridEntity()

Entity[] GetCollidingEntitiesWithGridEntity(GridEntity gridEntity)

Returns all the entities that are colliding with a given grid entity. Note that this function won't work in the POST_NEW_ROOM callback, since entities don't have collision yet.

GetGridEntities()

GridEntity[] GetGridEntities(GridEntityType ...)

Returns a list with all grid entities in the room.

GetGridEntitiesMap()

table<integer, GridEntity> GetGridEntitiesMap(GridEntityType ...)

Returns a map with all grid entities in the room indexed by their grid index.

GetSurroundingGridEntities()

GridEntity[] GetSurroundingGridEntities(GridEntity gridIndex)

Helper function to get all grid entities around a grid index, not including itself.

GetTopLeftWall()

GridEntity GetTopLeftWall()

Helper function to get the top left wall grid entity.

GetTopLeftWallGridIndex()

integer GetTopLeftWallGridIndex()

Helper function to get the grid index of the top left wall.

IsGridEntityBreakableByExplosion()

boolean IsGridEntityBreakableByExplosion(GridEntity gridEntity)

Helper function to check if a GridEntity is able to be broken with an explosion.

IsGridEntityBroken()

boolean IsGridEntityBroken(GridEntity gridEntity)

Helper function to see if the given GridEntity is in its respective broken state. Note that GridEntityType.GRID_LOCK will turn to being broken before the actual collision is turned off.

RemoveGridEntities()

void RemoveGridEntities(GridEntity[] gridEntities, boolean updateRoom)

Helper function to remove all grid entities from a given list.

RemoveGridEntity()

void RemoveGridEntity(GridEntity | integer gridEntityOrGridIndex, boolean updateRoom)

Helper function to remove a grid entity by providing the GridEntity or the grid index. If removing a Devil or Angel Statue it'll also remove the associated effect.

SpawnGigaPoop()

boolean SpawnGigaPoop(Vector | integer topLeftGridIndexOrPosition, boolean? force)

Helper function to spawn a giant poop. Will return true if the poop has successfully spawned.

SpawnGridEntity()

GridEntity? SpawnGridEntity(GridEntityTypegridEntityType, integer gridEntityVariant,Vector | integer gridIndexOrPosition, boolean? force)

Helper function to spawn a grid entity. Use this instead of Isaac.GridSpawn as it handles: - Walls and pits collision - Removing existing grid entities - Allows you to use the grid index

SpawnVoidPortal()

GridEntity? SpawnVoidPortal(Vector | integer gridIndexOrPosition, boolean? force)

Helper function to spawn a void portal. This is more complicated than just spawning a trapdoor with the appropriate variant, as it won't have the correct graphics and it won't lead to The Void.

Last updated