Skip to content

Bullet Manipulation Functions

ModCS.Bullet.SetRect()

ModCS.Bullet.SetRect(bul, left, top, right, bottom)
ModCS.Bullet.SetRect(bul, rect)

Sets the Rect of bul to a Rect with left, top, right, bottom.

If a rect is specified, set the Rect of bul to that Rect instead.

ModCS.Bullet.GetRect()

ModCS.Bullet.GetRect(bul)

Returns bul's Rect.

ModCS.Bullet.OffsetRect()

ModCS.Bullet.OffsetRect(bul, left, top, right, bottom)

Adds left, top, right, bottom to the the left, top, right, bottom values of the Rect of bul.

right and bottom are optional parameters. If they are not specified, left and top will be used in their place instead.

ModCS.Bullet.SetViewbox()

ModCS.Bullet.SetViewbox(bul, front, top, back, bottom)
ModCS.Bullet.SetViewbox(bul, rangerect)

Sets the sprite offset of bul to a RangeRect with front, top, back, bottom.

If a rangerect is specified, set the sprite offset of bul to that RangeRect instead.

ModCS.Bullet.GetViewbox()

ModCS.Bullet.GetViewbox(bul)

Returns the sprite offset RangeRect of bul.

ModCS.Bullet.ActCode()

ModCS.Bullet.ActCode(bul, bultype)

bultype is an optional parameter. If not specified, it will be set to bul's id.

Runs the action code for Bullet Type bultype to bul.

Note

This will run the vanilla act code for bultype. To run any overwritten act functions, run functions from the ModCS.Bullet.Act array instead.

ModCS.Bullet.Delete()

ModCS.Bullet.Delete(bul)

Deletes bul.

ModCS.Bullet.CountByID()

ModCS.Bullet.CountByID(id)

Counts how many Bullets of Bullet Type id are alive on the screen.

ModCS.Bullet.Move()

ModCS.Bullet.Move(bul)

Adds xm and ym of bul to bul's x and y.