Projectiles
Functions
Section titled “Functions”fireProjectiles()
Section titled “fireProjectiles()”fireProjectiles(
npc,position,velocity,projectilesMode?,projectileParams?): readonlyEntityProjectile[]
Defined in: packages/isaacscript-common/src/functions/projectiles.ts:26
Helper function to make an NPC fire one or more projectiles. Returns the fired projectile(s).
Use this function instead of the EntityNPC.FireProjectiles method if you need to modify or
access the EntityProjectile objects after they are fired, since this function returns the
objects in an array.
Parameters
Section titled “Parameters”EntityNPC | undefined
The NPC to fire the projectile(s) from. You can also pass undefined if you do not want the projectile(s) to come from anything in particular.
position
Section titled “position”Vector
The staring position of the projectile(s).
velocity
Section titled “velocity”Vector
The starting velocity of the projectile(s).
projectilesMode?
Section titled “projectilesMode?”ProjectilesMode = ProjectilesMode.ONE_PROJECTILE
Optional. The mode of the projectile(s). Default is
ProjectilesMode.ONE_PROJECTILE.
projectileParams?
Section titled “projectileParams?”ProjectileParams = ...
Optional. The parameters of the projectile(s). Default is
ProjectileParams().
Returns
Section titled “Returns”readonly EntityProjectile[]
The fired projectile(s).
fireProjectilesInCircle()
Section titled “fireProjectilesInCircle()”fireProjectilesInCircle(
npc,position,speed,numProjectiles): readonlyEntityProjectile[]
Defined in: packages/isaacscript-common/src/functions/projectiles.ts:65
Helper function to spawn projectiles in a circle around a position. Under the hood, this
leverages ProjectileMode.N_PROJECTILES_IN_CIRCLE.
Parameters
Section titled “Parameters”EntityNPC | undefined
The NPC to fire the projectile(s) from. You can also pass undefined if you do not want the projectile(s) to come from anything in particular.
position
Section titled “position”Vector
The staring position of the projectile(s).
float
The speed of the projectile(s).
numProjectiles
Section titled “numProjectiles”int
The amount of projectiles to spawn.
Returns
Section titled “Returns”readonly EntityProjectile[]
The fired projectile(s).
