GridEntities

Overview

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()

Entityarrow-up-right[] GetCollidingEntitiesWithGridEntity(GridEntityarrow-up-right 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()

GridEntityarrow-up-right[] GetGridEntities(GridEntityTypearrow-up-right ...)

Returns a list with all grid entities in the room.

GetGridEntitiesMap()

table<integer, GridEntityarrow-up-right> GetGridEntitiesMap(GridEntityTypearrow-up-right ...)

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

GetSurroundingGridEntities()

GridEntityarrow-up-right[] GetSurroundingGridEntities(GridEntityarrow-up-right gridIndex)

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

GetTopLeftWall()

GridEntityarrow-up-right 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(GridEntityarrow-up-right gridEntity)

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

IsGridEntityBroken()

boolean IsGridEntityBroken(GridEntityarrow-up-right 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(GridEntityarrow-up-right[] gridEntities, boolean updateRoom)

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

RemoveGridEntity()

void RemoveGridEntity(GridEntityarrow-up-right | 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(Vectorarrow-up-right | integer topLeftGridIndexOrPosition, boolean? force)

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

SpawnGridEntity()

GridEntityarrow-up-right? SpawnGridEntity(GridEntityTypearrow-up-rightgridEntityType, integer gridEntityVariant,Vectorarrow-up-right | 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()

GridEntityarrow-up-right? SpawnVoidPortal(Vectorarrow-up-right | 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