Skip to main content
Projectiles are objects that travel through the level and explode when they hit something. You create them with Level.createProjectile, configure their speed, direction, homing behavior, and explosion rules, then fire them — either automatically at creation or manually in your own code. Every projectile can carry onFire, onExplode, and onUpdate callbacks so you have frame-by-frame control over its behavior.

Creating a Projectile

The simplest signature creates a projectile using an inline property table:
You can also pass a ProjectileRequest object instead of a table.

Full Property Table

All fields except skin, origin, and rotation are optional.

Using ProjectileRequest

ProjectileRequest is a class alternative to the inline table. It is useful when you want to build the configuration incrementally or reuse a base configuration.

Querying Available Skins


The Projectile Object

Level.createProjectile returns a Projectile. You can read and write its properties after creation, and call methods to fire or detonate it manually.

Key Properties

Fire and Explode


The OnProjectileCollide Hook

Any entity script can define OnProjectileCollide to react when a projectile hits it:

Complete Example — Enemy That Fires a Homing Projectile