Entities
Last updated
Last updated
any
void
void
void
[] GetEntities(
| integer? entityType = -1 , integer? variant = -1 , integer? subType = -1 , boolean? ignoreFriendly = false )
Helper function to get all of the entities in the room or all of the entities tht match a specific entity type / variant / sub-type. Due to bugs with Isaac.FindInRadius
, this function uses Isaac.GetRoomEntities
, which is more expensive but is also more robust. (If a matching entity type is provided, then Isaac.FindByType
will be used instead.)
Gets some arbitrary data for an entity. Use this instead of Entity:GetData()
since that is global and allows for other mods to edit your data. This is also better than manually keeping track of the data manually with the save manager since the PtrHash can be reused after the entity is removed and this keeps track of it manually. Use only for non persistent entities like effects.
Helper function to get a map containing the positions of every entity in the current room.
Helper function to get a map containing the velocities of every entity in the current room.
Checks if an entity is colliding with a grid entity. If it does, returns the grid entity it's colliding with, else returns nil.
Sets some arbitrary data for an entity. Use this instead of Entity:GetData()
since that is global and allows for other mods to edit your data. This is also better than manually keeping track of the data manually with the save manager since the PtrHash can be reused after the entity is removed and this keeps track of it manually. Use only for non persistent entities like effects.
Helper function to set the positions of all the entities in the room. Useful for rewinding entity positions.
Helper function to set the velocities of all the entities in the room. Useful for rewinding entity velocities.
Helper function to spawn an entity. Use this instead of the Isaac.Spawn
method if you do not need to specify the velocity or spawner.
[]
(`
(table
mod, entity, string
field)
table<, >
([]?
entities)
table<, >
([]?
entities)
?
( entity)
(table
mod, entity, string
field, any
value)
(table<
,
>
positions, []?
entities)
(table<
,
>
velocities, []?
entities)
( entityType, integer
variant, integer
subType, position, ?
velocity, ?
spawner, `integer
any GetEntityData(table mod,
entity, string field)
table<
,
> GetEntityPositions(
[]? entities)
table<
,
> GetEntityVelocities(
[]? entities)
? IsCollidingWithGrid(
entity)
void SetEntityData(table mod,
entity, string field, any value)
void SetEntityPositions(table<
,
> positions,
[]? entities)
void SetEntityVelocities(table<
,
> velocities,
[]? entities)
Spawn(
entityType, integer variant, integer subType,
position,
? velocity,
? spawner, integer |
? seedOrRNG)